jQuery stopPropagation not working when applied to textbox inside anchor
问题 hope you can help me. I have html markup like this: <a href="error.htm" class="button" id="_uiStart" style="-moz-border-radius: 4px 4px 4px 4px;"> <span>Start</span> <input type="text" id="_uiCode"> </a> Normaly, when user clicks on the textbox, the page redirects to "error.htm". I wanted to prevent that so I use jQuery to cancel that: $(document).ready(function() { var mute = function(event){ event.stopPropagation(); }; $('a.button input').click(mute) .mousedown(mute) .mouseup(mute); }