I'm using jQuery Toggles plugin: https://github.com/simontabor/jquery-toggles
Here's my code:
$(function(){
$('.toggle').toggles({
clicker:'.i-am'
});
$('.i-am').click(function(){
if ($(this).hasClass('active')){
return false; /* And it doesn't stop the toggling */
}
});
});
As you see, I want to disable toggling, when clicking on .i-am.active. But return false; doesn't do the trick. How can I achieve this?
Update. Created jsfiddle to make it clear: http://jsfiddle.net/webstyle/fBpvb/