JQuery Toggle Ignore Double Click

Just replace $(“.header”) with your selector.

function toggle() {
$(".header").unbind("click");

var next = $(this).next();
if (next.css("display") != "none")
next.hide("slow", bind);
else
next.show("slow", bind);
}

function bind() {
$(".header").click(toggle);
}

bind();

Leave a Reply

Spam protection by WP Captcha-Free