Hyperlinks updating prevent that's sauna


yes, just write:
<a href ="#" id="mylink">sdasdsa</a>
Leave a comment on rsaccon's reply
I'm not sure if this is the "proper" solution, but I had a few cases where I needed button functionality without the links, so I wound up wrapping them within span tags. All the formatting elements still worked. Here's an example:
<span onclick="DecreaseMyHonor();" data-role="button" data-inline="true" data-icon="minus">&nbsp;&nbsp;</span>
This created a button for me and still gave me some click functionality. I realize that I should probably wire up the event after the fact, but having the inline function call worked for me.
Leave a comment on dillieo's reply
Thanks for the reply, cannot believe that i actually answered my own questions, doh! but now my link code is now firing:
i have the following:
<div id="container">
      <a href ="#" data-role="disable" id="linkid >sdasdsa</a>
then further down I have :
$(document).ready(function() {
alert('click: ' +;
but this click function does not work/display message?
Leave a comment on simon_davies1's reply
Especially when using AJAX transitions this will not work. The $(document).ready is not loaded after a page transition instead use the pagecreated function. You might run into trouble with the identifiers of the buttons. The problem is that your DOM has the element with that id twice: one visible and one invisible. I solved this by using class names instead of ids.
Leave a comment on basvdijk's reply
Leave a comment on simon_davies1's reply
$('[data-role=page]').live('pageshow', function (event, ui) {

     your code here.


You need to detect on which page you are, otherwise it will fire every time a page change occurs.
Leave a comment on basvdijk's reply
Leave a comment on simon_davies1's reply
Reply to simon_davies1's question

Disable href link

in jQuery Mobile •  7 years ago  
is it possible to disable several href links, as I could do with having several href tags but with out them trying to load what ever is within the href, as I want manipulate the href content myself if you see what I mean
For example something like
<a href ="content" data-role="disable" >sdasdsa</a>
so if this link is click it does nothing, so that I can then manipulate it in my code further down:
$('#idname a').bind('click',function(e){