319 posts
  • Sold between 10 000 and 50 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Referred between 100 and 199 users
  • Bought between 50 and 99 items
  • Has been a member for 3-4 years
  • Microlancer Beta Tester
  • Exclusive Author
  • Portugal
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