How can I get the jQuery plugin to update the loaded data?
I am working with jQuery Pagination and popup form. By storing the data in the form, how do I get the Pagination plugin to reload the data it will load for whatever page I'm on without reloading the entire web page?
Example: Point 1 Point 2 Point 3
Add Item-> Item 23-> Save-> Restart List
Clause 1 Clause 2 Clause 3 Clause 23
http://d-scribe.de/webtools/jquery-pagination/lib/jquery_pagination/README
a source to share
The only thing I could think of doing in this situation (and I'm not sure if this will work) is to call the page initialization function again. So you have to add a new element and then call it again,
function addNewElement() {
$.create('div', {}).appendTo("container");
$("#container").pagination(numElements, {
items_per_page:20,
callback:handlePaginationClick
});
}
Now, I've never used this plugin before, but I don't think there is any other way to "reload" the content as the plugin doesn't give you this option. Also, hopefully this overwrites the first call you made and doesn't add it to the first call.
I've used domec plugin here with $ .create. Just know that this is where you create your new element.
Hope it helps!
Metropolis
a source to share