I have following code which captures when a user clicks on the a tag in the li. I can successfully capture the event, but if I use setTimeout in the event the inline ‘return false’ in the a tag stops this from happening. Any ideas on how to stop or remove the inline a tag ‘return false;’?
I cannot just delete it as this is being used for the desktop site and I am overriding its functionality for the mobile site.
<ul class="paginate">
<li>1</li>
<li>
<a href="http://www.xxx.co.uk/xxx/" onclick="ajaxPage('2',true,'left'); return false;">2</a>
</li>
</ul>
$('.paginate li a').click(function(){
alert('Caught page'); // THIS WORKS
setTimeout(function(){
setSearchPrice(); // THIS DOESN'T WORK, GET SUPPRESSED BUT THE INLINE RETURN FALSE
},1400)
});
Any help is appreciated.
I don’t see what that has to do with it, but you can remove the
onclickDOM0 handler: