josecebe / twbs-pagination

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

After Using 'initiateStartPageClick: false' selected page background is not changing #146

Closed coddyrabbit closed 7 years ago

coddyrabbit commented 7 years ago

After Using 'initiateStartPageClick: false' selected page background is not changing, but every thing works good apart from this.

$('#pagination').twbsPagination({ startPage: 1, totalPages: total, initiateStartPageClick: false, visiblePages: 12, onPageClick: function (event, page) { var catId = $('input:radio[name="category"]:checked').val(); $("html, body").animate({ scrollTop: 0 }, "slow"); scope.getBusiness(,page,12,catId); } });

Ectropy commented 7 years ago

Are you trying to change the background via JavaScript or something like that? I didn't see where that would be done in your code. Perhaps in getBusiness?

pavelthq commented 7 years ago

@coddyrabbit make onPageClick function by variable and just run it on document.ready.

 function (event, page) {
var catId = $('input:radio[name="category"]:checked').val();
$("html, body").animate({ scrollTop: 0 }, "slow");
scope.getBusiness(,page,12,catId);
}
coddyrabbit commented 7 years ago

Tanks for your reply issue resolved

zhujinhu21 commented 7 years ago

@coddyrabbit I have the same problem..how did you to solve it