eGzyl.pl Posted February 23, 2010 Share Posted February 23, 2010 i want make slide only in second ul in my categoryi done: $('ul li ul li').click( function() { $(this).children('ul').toggle(); if ((this).children('ul')){ return false; } else{return true;} }); but i have one prolbem li in second ul dont open because return false what condition i must write do work?? if ((this).children('ul')) - its not work :<SOLVET: $('ul.tree li ul li a').click( function() { if($(this).parent().children('ul')[0]) { // $(this).parent().parent().children('li ul li').slideUp(); if($(this).parent().children('ul').css('display')!='block') { $('.active').slideUp(); $('.active').removeClass('active'); $(this).parent().children('ul').slideToggle(); $(this).parent().children('ul').addClass('active'); } return false; }else { return true; } } ); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now