href and onclick not playing nice in mobile safari
a test as simple as the following is not behaving as expected (show the alert) on iPhone/iPad.
Works on all other browsers and also the iPhone simulators.
- <a id="trigger_a" onclick="return false;" href="jsnotworking" >
- <h1>Click here</h1>
- </a>
- <script type="text/javascript">
- $(document).ready(function(){
- $("a").click(function(event){
- alert('now!');
- });
- });
- </script>
Does Mobile Safari/iOS have a different event handling model?
Any help is much appreciated.
Thanks