josecebe / twbs-pagination

jQuery pagination plugin (bootstrap powered)
http://josecebe.github.io/twbs-pagination/
Other
1.1k stars 401 forks source link

Not update item class to active when call show method #84

Closed yigityuce closed 8 years ago

yigityuce commented 8 years ago

Hi,

I tried to update current page when document is ready, with this:

$('#pagination').twbsPagination('show', page-number);

But when i did this it didn't set the list item(page-number) class to "active". How can i do this?

Thanks.

pavelthq commented 8 years ago

Should work. Can you provide full code for example in codepen or fiddle?

yigityuce commented 8 years ago

Hi again,

Here is a not working code https://jsfiddle.net/khgpefr6/1/ But i found why it is not working. The show method is called with string type page number in my code, but it should be an integer. So i fixed the problem with this: https://jsfiddle.net/9okwL2tf/2/

Maybe you can add control or conversion at the beginning of the function. Thanks for your quick reply btw.