468,321 Members | 1,639 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,321 developers. It's quick & easy.

Update pagination when filter is selected? - jquery

Hey, I'm trying to get my pagination numbers to update when the user uses the filter options at the side.

Here is what I'm talking about: When you click the color - Yellow - you should only get 1 result(Giant) and only 1 page number should display. however the pagination is not updating properly and still displays all page numbers.

Here is the page (View page source to see all code including jquery)

I'm assuming I have to put the pagination function -> paginateIt() <- somewhere in the filter script when the filter is started, but im unsure where to properly place it if that's the case.

Thanks for any help on this.
Jan 9 '10 #1
1 3724
16,027 Expert Mod 8TB
Since you're hiding elements for the filter, in the paginate function, check the shown elements (display:block) for number_of_items here:
Expand|Select|Wrap|Line Numbers
  1. var number_of_items = $('#content ul').children().size();
You'll probably have to change the code in the go_to and next/previous functions, but one easy way could be to add a class when filtering and paginate that instead.
Jan 10 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by Sharif T. Karim | last post: by
2 posts views Thread by Chris H | last post: by
1 post views Thread by shalini jain | last post: by
3 posts views Thread by Michel Esber | last post: by
16 posts views Thread by gnawz | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by howard w | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.