hi guys,
i've made a simple tab switcher in my site, it work's like it has to; the issue is that when you scroll the page, and than try to change the visible tab, the page moves for (to me) no reason!
if you want to take a look just click:
here's the javascript:
- $(document).ready(function () {
-
- $('#zona1 .sez.active').fadeIn(0);
- $('#schede li span.centro').click(function(){
-
- var sezione = $(this).attr('id')
-
- if ($(this).is ('.active')) { donothing }
-
- else{
-
- $('#schede li span.active').removeClass('active').parent().removeClass('active');
-
- $(this).siblings().addClass('active').end().parent().addClass('active').end().addClass('active');
-
- $('#zona1>div.active').fadeOut(150, function(){$(sezione).fadeIn(800).addClass('active')}).removeClass('active')
- }
- });
- });
by the way, i really don't remember where, but i guess i saw the "donothing" statement used like i've used in my script. Thanks to firebug i know it's an error, i've searched the "donothing" function, i've fount the noop() one; i cant make it work!!!
if you can put me in the right direction will be appreciated! ;)
regards,
your Apprentice