jquery - how to update the url using ajax pagination in cakephp 2? -


good morning,

i created pagination via ajax using cakephp2.3, working properly. problem page number not being updated in url.

he getting way:

  / localhost/cakephp-2.3.4/anuncios/inicio / 

and hoped appeared page / type, more or less, if click on page 7, url must be:

  / localhost/cakephp-2.3.4/anuncios/inicio/page: 7 

does know how can this? searched did not find material me.

use history.pushstate

set js links sorting , paging, example:

if (history && history.pushstate) {         $('.yourtable th a, .paginationbar .controles a').on('click', function () {             $.getscript(this.href);             history.pushstate(null, document.title, this.href);             return false;         })         $(window).bind("popstate", function () {             $.getscript(location.href);         });     } // history 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -