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
Post a Comment