jquery - Accordian Item to be placed on top of window -


i have requirement should have display active accordian on top of window

currently i'm using following jquery code.

$('span').click(function () {         $('.hide').slideup();         $(this).parent().find('.hide').slidedown();         var myscroll = $(this).offset().top;         $(window).scrolltop(myscroll);     })  

please see fiddle can find rest of code.

if click span having text clickable, want clickable , expanded text on top of window , other clickables should do.

p.s want jquery solution.

thanks in advance.

i'll take leap of faith , guess close want.

fiddle

js

$('span').click(function(){       $( '.hide' ).hide();       var spanclass = $(this).attr('class');       $( '#' + spanclass ).toggle( 1000 );             }); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -