wesnolte / Pajinate

A jQuery Pagination Plugin
http://th3silverlining.com/2010/04/15/pajination-a-jquery-pagination-plugin/
MIT License
207 stars 97 forks source link

Callbacks #6

Closed FlashJunior closed 13 years ago

FlashJunior commented 13 years ago

Are there callback functions? Like

.trigger("pajinateChanged")

where you can add a listener from outside like

$('.list_holder').pajinate().bind("pajinateChanged", function(){
    alert("do what you like");
})
wesnolte commented 13 years ago

None at the moment and I don't have plan in the short term to add them. I'd be happy if you forked the project and added them though :)

FlashJunior commented 13 years ago

hehe. ok.

FlashJunior commented 13 years ago

i build a test. you can take a look @ https://github.com/FlashJunior/Pajinate/commit/79a7fe46e945e345380f229ee348fd623e5f7356

what do you think?

you can add "init", "change", "goto", "showPrevPage" and "showNextPage" eventlisteners.

just put a .bind on your "container" example:

$('#paging_container1').bind("change", function(){ alert("change");})

PS: can you reopen this ticket?