Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    making 2 scripts work together

    Hi,

    I'm working on a project where I have two scripts; 1 accordion and 1 price range slider. These two elements work fine, apart from each other. But when I place both on one page, the accordion stops working.
    Firebug comes back with $(".menu_head") is null, where menu_head is the clickable title for the accordion.

    Here you can see it in action. On the left side of the page both accordion and range slider sits. When you click for instance Enschede Centrum, this should start a submenu to slide down.

    Thanks in advance for your reaction.

    Jeff

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,955
    Thanks
    9
    Thanked 726 Times in 720 Posts
    Looks like jQuery and mooTools are conflicting.

    In frmwrk.js replace this:

    Code:
    /* accordion voor facetzoeken - aanbod */
    $(document).ready(function() {
    	$(".menu_head").click(function() {
    		$(this).addClass('facet_open').next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("normal");
           	$(this).siblings().removeClass('facet_open');
    	});
    });
    with this:

    Code:
    $.noConflict();
    /* accordion voor facetzoeken - aanbod */
    jQuery(document).ready(function($) {
    	$(".menu_head").click(function() {
    		$(this).addClass('facet_open').next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("normal");
           	$(this).siblings().removeClass('facet_open');
    	});
    });


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •