I'm making a responsive topic for anyone I've created a menu, but I used jQuery slides to use jQuery. Using slide (). The problem is that when I toggle the menu open, it also opens all the sub-menus in it.
I can add selectors to fix this problem. However, by adding selectors, this means that the user should add the sub-menu if he may have to change the jQuery so I am trying to keep it so that the user never have to touch jQuery.
Is there a solution to this problem?
HTML : CSS : jQuery : Flood : try Do it Then you will use the
& lt; Div id = "linkList1" & gt; & Lt; Div class = "menu-toggle" & gt; Menu & lt; / Div & gt; & Lt; Ul class = "firstlevel" & gt; & Lt; Li & gt; The first link & lt; / Li & gt; & Lt; Li class = "shared-toggle" & gt; The first link & lt; Ul class = "secondlevel" & gt; & Lt; Li & gt; First drop link & lt; / Li & gt; & Lt; Li & gt; Second drop link & lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt;
ul {display: none; }
$ ("menu-toggle"). Click (function () {$ ("# linklist 1 ul"). Slide toggle ("sharp");}); $ ("Share Toggle"). Click (function () {$ ("# LinkList1 ul ul"). Slide Toggle ("sharp");});
$ ("menu-toggle"). Click (function (e) {$ (this) .next ('ul') Slide Toggle ("sharp");}); $ ("Share-toggle"). Click (function (e) {$ (this) .find ('ul') SlideToggle ("sharp");});
this context, which organizes the current selected element that generates the event and related the
Ul shows . >
No comments:
Post a Comment