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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -