Data-bind button with href attribute

1 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    5 posts
    Member since:
    Oct 2012

    Posted 17 Oct 2012 Link to this post

    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 does not 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.

    I hope that makes sense!  Any ideas?
Back to Top