Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS e.preventdefault stops links and when removed, tabs stops working. Re: e.preventdefault stops links and when removed, tabs stops working.

#106158
Senff
Participant

I’m not really sure why you put a preventDefault on an LI in the first place — the default action of clicking on an LI is nothing, so there’s nothing to prevent.

If there is an anchor/link in your LI that you’re clicking on, that would make more sense to me, so maybe you should target that, and put the function (and preventDefault) on the $('li a').

Regardless, using your code in a fiddle seems to work: http://jsfiddle.net/senff/Ly5C5/1/ so there’s probably something else going on there.