We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27113
    • 3 Posts
    Hi,

    I want to use navigation with jquery from cssplay site. Navigation is here: http://www.stunicholls.com/menu/jquery-slide-1.html

    Everything working great but if I add jquery code to modx menu just dont working sad

    Can anyone help me with that? Many thanks for some solution.
    Jquery code is here:

    
    $(document).ready(function(){
    	if($("#nav")) {
    		$("#nav dd").hide();
    		$("#nav dt em").click(function() {
    			if(this.className.indexOf("clicked") != -1) {
    				$(this).parent().next().slideUp(200);
    				$(this).removeClass("clicked");
    			}
    			else {
    				$("#nav dt em").removeClass();
    				$(this).addClass("clicked");
    				$("#nav dd:visible").slideUp(200);
    				$(this).parent().next().slideDown(500);
    			}
    			return false;
    		});
    	}
    });
    
    
      • 27113
      • 3 Posts
      I think that my jquery code has confict with mootools. I read several articles but no success sad Can anyone help please?
        • 4310
        • 2,310 Posts
        Try :
        var $j = jQuery.noConflict();
        $j(document).ready(function(){
        	if($j("#nav")) {
        		$j("#nav dd").hide();
        		$j("#nav dt em").click(function() {
        			if(this.className.indexOf("clicked") != -1) {
        				$j(this).parent().next().slideUp(200);
        				$j(this).removeClass("clicked");
        			}
        			else {
        				$j("#nav dt em").removeClass();
        				$j(this).addClass("clicked");
        				$j("#nav dd:visible").slideUp(200);
        				$j(this).parent().next().slideDown(500);
        			}
        			return false;
        		});
        	}
        });
        
        
          • 27330
          • 884 Posts
          did u test it when u are not logged into the manager?