I've seen a couple of posts about this, none with a really good answer. What is the best way to refresh a page without reloading the site?
Here is my use case, I have a group page that i am not a member of. This shows limited data. I can join the group. Now i can see more data. I want to refresh the page, without reloading the site. I have tried sending a ajax request for the new page and swapping the html and running .page(), but that did not work.
I have a couple of other use cases, but it all come down to being able to easily refresh the html and rerun the page setup.
this is what i tried to do:
- jQuery.fn.refresh = function() {
- var page = $(this);
- $.ajax({
- url: page.jqmData('url'),
- success: function(new_page){
- page.html($(new_page).html());
- page.page();
- }
- });
- };