Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

A href="#" event handler returns false #1118

Closed
mattpepin opened this issue Feb 18, 2011 · 2 comments
Closed

A href="#" event handler returns false #1118

mattpepin opened this issue Feb 18, 2011 · 2 comments

Comments

@mattpepin
Copy link

The jQuery mobile event handler for click should not return false for a href="#" link (near line 2210). It should only call e.preventDefault(). If I want to bind custom javascript script on one of my links, I must explicitly set data-ajax="false" if I want the script to be executed, even if the script has nothing to do with ajax. This is because returning false stops event propagation.

@scottjehl
Copy link

yeah that makes sense. thanks

@scottjehl
Copy link

null hrefs should just preventDefault and return, rather than returning false. Closed by b6b7aeb

fcheslack pushed a commit to fcheslack/jquery-mobile that referenced this issue Jul 28, 2011
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants