Ask questions and get good answers on mb.jQuery.components

Hello. First of all, I would like to thank you very much! I think you should create a donation button near your jQuery components. I would donate!

Well, my question is: if I change the pageIndex menu to individual divs with goToPage method, how could I add and remove "disabled" and "sel" classes to the div content? I mean, if I put divs as individual buttons (instead of the default pageIndex menu) so how could the user know which of those buttons is the current page?

Other question is... when I reach the 12nd page and then go back to a previous page, it behaves weird: it goes to the previous page, but first it scrolls to the very first page and, then, goes to the correct page. Here is the example: http://www.maisunifra.com.br/conteudos/letras/pragmatica_grice/conteudo.html

I've tried adding more pages but it always happens when it reaches the 12nd page... :(

Could you help me?

Thank you in advance!

asked Jan 16 '11 at 15:52

lammel's gravatar image

lammel
1


For the first question:

Why don't you add a custom method to set a "selected" class to the element you clicked on:

onclick="$('#myScroll').goToPage([11]); $('.customMenu.sel').removeClass('sel');$(this).addClass('sel');"

For the second question:

This is a strange behavior that doesn't happen on my tests... And it's hard for me to debug it. I'll try to check your code and see what's going wrong.

answered Jan 17 '11 at 16:15

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×14

Asked: Jan 16 '11 at 15:52

Seen: 486 times

Last updated: Jan 17 '11 at 16:15

jQuery main site - Matteo Bicocchi