Skip to content

Instantly share code, notes, and snippets.

@alexanmtz
Created June 24, 2012 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexanmtz/2984795 to your computer and use it in GitHub Desktop.
Save alexanmtz/2984795 to your computer and use it in GitHub Desktop.
jQuery Sliding using onAppend to change data from server
$('element').sliding({
items: 4,
url: url,
urlFormat: '{url}/page/{page}/',
next: nextLink,
prev: prevLink,
disabledClass: 'disabled',
speed: 500,
onAppend: function(data) {
// data is { total_pages: 2, html: 'content' }
return data.html;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment