Menu
Hi All
I have something like this:
[code=php]$(‘a’).live(‘click’, function(e) {
console.log(“test”);
e.preventDefault();
do_something() ;
//return false ;
}) ;
When a link is clicked everything goes well, except that I get the page the anchor is refering too, meaning the ‘e.preventDefault();’ doesn’t work
I’ve also tested it with
[code=php]<a href=”http://www.example” onclick=”alert(‘OK’);event.preventDefault();”>sdfsdf</a>
which works!
Any suggestions how to fix this with jQuery ?