Skip to content

Instantly share code, notes, and snippets.

@kagemusha
Created March 19, 2012 02:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kagemusha/2090705 to your computer and use it in GitHub Desktop.
Save kagemusha/2090705 to your computer and use it in GitHub Desktop.
JQueryMobile: Link callbacks when href='#'
Circa: 1.1.0rc1
If have href='#', e.g. %a{href: '#', id: 'mylink'}, jqm will not fire an event so callback $('#mylink').click won't get called.
Instead do %a{href: 'javascript:myFunction()', ...}
Ref: http://forum.jquery.com/topic/how-can-i-create-buttons-that-execute-some-javascript-without-linking-to-any-address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment