I have disabled the default anchor if it has a subnav class, as shown in this script .
I want this to be disabled for the first click, then I want to return the normal binding function. What is the best way to do this? I tried something using the code below, but that didn't work?
$(this).unbind(event.preventDefault());
maybe something like this psuedo code?
if (click count === 0 ) { event.preventDefault(); }
or is there a better way to approach this?
source share