March 17, 201511 yr Hello again, I've designed a jquery menu using nested ul lists. This is in share point so the classes are all the same name, (including ul tags and li tags, so I can't change these names which is really frustrating. Anyway here's the code <ul id='zz13_RootAspMenu'> <li class='static'> menu text <ul class='static'> <li class='static'> Sub menu text </li> </ul> </li> </ul> I've tried a couple of ways to toggle the sub menu text here they are: [code] $('#zz13_RootAspMenu').bind('hover', function (e) { if($(this).children('ul.static li.static').length =0){ return false; } else{ $(this).children('#zz13_RootAspMenu li.static').slideToggle(); return false; } }); $(function() { $('#zz13_RootAspMenu li ul').on('hover', function(e) { e.stopPropagation(); $(this).children().slideToggle(); }); }); [/code] These are only two of the many combinations I've tried. Whenever I try to add a level, for example, #zz13_RootAspMenu li ul li ul, and so on nothing happens. Can anyone help?
March 18, 201511 yr Author It's ok fellas, I fixed it last night. There was a line in my css that was conflicting with the child elements.
Create an account or sign in to comment