javascript - Vertical multilevel Menu slideToggle -



javascript - Vertical multilevel Menu slideToggle -

i newbie in jquery/js , trying create tabbed menu jqueryui/jquery. wanted inner tabs there created using slidetoggle. have slidetoggle in tabs , want 1 close when slidetoggle open, did tabs slideup menu if open not able 1 slidetoggles. here code tried:

$(function() { $( "#tabs" ).tabs(); }); $(document).ready(function() { $(".menu a").click(function(){ $(".video").each(function(){ $(this).get(0).pause(); }); }); //tabbing selection $(".menu li:eq(0)").addclass("active"); $(".menu li").click(function(){ $(this).addclass('active'); $(this).siblings().removeclass('active'); }); $(".subtabs").click(function(){ $(this).nextuntil("li.tabsclose").slidetoggle(); $(this).removeclass('active'); $(this).next().addclass('active'); }); $(".tabs").click(function(){ $(".subtabsinner").slideup(); }); });

and link codepen http://codepen.io/surajverma/pen/fskmu.

before posting question, tried google , searched on stackoverflow, not able find similar.

thanks.

you can add together next line in $(".subtabs").click

$('.subtabs').not(this).nextuntil(".subtabs").slideup();

demo available

http://codepen.io/anon/pen/dbkae

what'll pull up, subtabs apart 1 active

javascript jquery html css jquery-ui

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -