Jquery toggle function that doesn't return false?
- by Tom
Hi,
Is it possible to stop the automatic preventDefault() from applying in a simple Jquery toggle function?
$(".mydiv").toggle(
function () {
$(this).addClass("blue");
},
function () {
$(this).removeClass("blue");
}
);
The above prevents elements inside the div from responding normally to the click.
It doesn't have to be the toggle() function - anything that allows toggling a class on and off AND doesn't return false would be great.
Thanks.