I have the default anchor disabled if it has a class subnav as shown in this fiddle.
I only want this disabled for the first click then I want the normal anchor function
You could use something as simple as self unbind in the click handler.
Something like
function stopEventOnce(event) { event.preventDefault(); $(this).unbind('click',stopEventOnce); return false; } $(".subnav a").bind('click', stopEventOnce);
Modified fiddle