This is a migrated thread and some comments may be shown as answers.

Click handler with href attribute

0 Answers 119 Views
Button (Mobile)
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 18 Oct 2012, 12:44 AM
I am attempting to add a "click" handler to a button (actually an anchor tag with data-role="button" attribute) that also has an 'href' attribute specified.  Essentially, I want to specify which view the button should link to in the HTML, but run some code prior to switching.

Unfortunately, the navigation appears to cancel out the click handler, so my click event doesn't fire.  I verified that I had the click event wired up properly by removing the 'href' attribute, and everything works as expected (except the view doesn't change), then when I add the 'href' attribute back in, the click event stops firing.

Any ideas?

No answers yet. Maybe you can help?

Tags
Button (Mobile)
Asked by
Jeremy
Top achievements
Rank 1
Share this question
or