jquery pagination not work after ajax load
Im use jspages.js to create pagination from jquery. everything is okay
when page loaded at the first time. but i have error when the content on
pagination loaded after ajax. the plugin dint work :(. this my code to
create pagination.
<script src="js/jquery.js"></script>
<script src="js/jPages.js"></script>
<script src="js/jquery.lazyload.js"></script>
<script type="text/javascript">
$(function() {
$("ul li img").lazyload({
event : "turnPage",
effect : "fadeIn"
});
$(".holder").jPages({
containerID : "itemContainer",
animation : "fadeInUp",
previous : "Prev",
next : "Next",
perPage : 3,
callback : function( pages, items ){
items.showing.find("img").trigger("turnPage");
items.oncoming.find("img").trigger("turnPage");
}
});
})
</script>
No comments:
Post a Comment