JQuery quick update button

I'm having problems when I add new content to the database, the pages are not updating. So I was thinking of adding an update button.

Hope I can do it?

+5
source share
2 answers

You do not need jQuery to refresh the page. You just need to call location.reload(true).

By setting the first (and only) argument true, we force the update from the server, and not just reload the page from the cache.

+2
source

, , , jQuery . location.reload(true) , URL- -.

:

, jQuery Mobile Ajax <div data-role="page"> first, ( , ).

:

, . , , .

$('body').delegate('a[data-cache=false]', 'click', function() {
    var $this = $(this);

    $('[data-url="' + $this.attr('href') + '"]' ).remove();

});

click (, ), div jQuery .

:

data-ajax="false" rel="extenal", . jQuery , , . http://jquerymobile.com/blog/2011/05/13/jquery-mobile-team-update-week-of-may-9th/.

+10

All Articles