BuddyPress --> Studio Theme -- slide.js

I am having issues with the /themes/studio/library/scripts/slide.js file.

When I added a jQuery form to my page, the slide.js file is conflicting with form processing. If I remove slide.js from being included in my header.php then the form is able to be processed and all jQuery validation works perfect. As soon as I enable slide.js to be written to the header, my form won't process.

Here is the slide.js code:

jQuery(document).ready(function() {
jQuery.noConflict();
jQuery(document).ready(function() {
// Expand Panel
jQuery("#open").click(function(){
jQuery("div#panel").slideDown("slow");
return false;
});
// Collapse Panel
jQuery("#close").click(function(){
jQuery("div#panel").slideUp("slow");
return false;
});

// Switch buttons from "Log In | Register" to "Close Panel" on click
jQuery("#toggle a").click(function () {
jQuery("#toggle a").toggle();
return false;
});

});
});

jQuery Form Code:
<script type="text/javascript">
(function($){
$(document).bind('ready.moonray_order_form_jb_611',function(){
$("div.jb_611 form").moonrayOrderForm({
timeZoneOffset:8,
products:{"1":{"chargedToday":0,"chargedLater":[{"amount":".01","count":"1","unit":"month","type":"sub","date":false}],"delayDate":false,"taxable":false,"shippable":false,"hasPaymentPlans":false}}
});
});
})(jQuery);
</script>

I am limited with my knowledge of jQuery. both scripts work independently but when I try to use both on the same page, only slide.js works. slide.js controls the community panel drop down.

Any advice is welcome and appreciated. Thank you

  • ddrohde
    • New Recruit

    Thanks. I tried to add the following:

    <script type="text/javascript">
    var $j = jQuery.noConflict();
    (function($){
    $j(document).bind('ready.moonray_order_form_jb_895',function(){
    $("div.jb_895 form").moonrayOrderForm({
    timeZoneOffset:8,
    products:{"1":{"chargedToday":0,"chargedLater":[{"amount":"0.01","count":"1","unit":"month","type":"sub","date":false}],"delayDate":false,"taxable":false,"shippable":false,"hasPaymentPlans":false}}
    });
    });
    })(jQuery);</script>

    I un-commented the slide.js file after the updated. Same error shows:
    $ is not a function

    When the slide.js is not included it works fine. BTW - both are using jQuery.

    Thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.