|
|||
Jquery toggle() Problem mit children element
Hallo zusammen,
ich bau gerade ein menu. HTML-Code:
<ul class="menu"> <li>/li> <li class="parent"> <ul><li></li></ul> </li> <li></li></ul> Mein jQuery-Code sieht so aus, ich benutze nicht $ sondern jQuery wegen eines Konfliktes. HTML-Code:
jQuery(document).ready(function(){ //Hide (Collapse) the toggle containers on load jQuery("ul.menu li.parent ul").hide(); jQuery('ul.menu li.parent').toggle(function(){ jQuery(this).find('ul').stop(true,true).slideDown(300); },function(){ jQuery(this).find('ul').stop(true,true).slideUp(300); }); }); Homepage |
Sponsored Links |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
div umgibt checkbox..jquery toggle um checkbox zu checken? | sepp88 | Javascript & Ajax | 7 | 12.01.2010 22:26 |
jQuery: nur ein Element wählen | Sonny Lane | Javascript & Ajax | 23 | 08.08.2008 16:09 |
Problem: Element am Seitenende | confidant | CSS | 1 | 04.12.2006 15:25 |
Validation Problem: input | ONeill | (X)HTML | 5 | 09.03.2006 12:38 |
Validator Problem | Starfox128 | Site- und Layoutcheck | 3 | 04.10.2004 16:44 |