Toggle alternative

Posted by Nutmeg on Stack Overflow See other posts from Stack Overflow or by Nutmeg
Published on 2010-05-07T07:07:04Z Indexed on 2010/05/07 7:18 UTC
Read the original article Hit count: 159

In a contactform I am using both the jQuery validation plug-in 1.3 and the following (slide) script:

$(document).ready(function() {

    // Expand Panel
    $("#open").click(function(){
        $("div#contact").slideDown("slow");

    }); 

    // Collapse Panel
    $("#close").click(function(){
        $("div#contact").slideUp("bounce"); 
    });     

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

});

Problem is that the validation plug-in 1.3 uses the following segment: addWrapper:function(toToggle){if(this.settings.wrapper)toToggle.push(toToggle.parents(this.settings.wrapper));return toToggle;}, which conflicts with the slide code.

What's the smartest way to go about this? Using the toggleClass instead?

Thanks for your help!

© Stack Overflow or respective owner

Related posts about jquery-plugins

Related posts about jquery-validate