342 posts
  • Affiliate Level 4
  • Author Level 5
  • Beta Tester
  • Collector Level 3
+6 more
vtimbuc
says

You don’t need to remove the anchor tag, you can keep that and in the href just put “javascript:void” (some people use hashes but those throw you to the top of the page so I avoid them). Then you just switch the event to the list item and voila, you save one more function call which is always nice for performance (even if it’s a tiny increase!) :) And your welcome!

That’s true, but on the project I’m working on I need to use the click event on the anchor tag because there are more functions in there that are related to the anchor tag and If I would use the click on the list I will have to repeat more unnecessary code :)

by
by
by
by
by
by