Wondering how to use the jQuery onclick event? Since you are using jQuery, you likely shouldnt be using onclick attributes anyways. The fix is to put a proper URL in your href attribute. Then attach the JS logic via jQuery 2- Hello jQuery example. Create examples folder, the examples in this document will be placed in this folder.input type"button" onclick"selectAdv()" value"Select First Child of div"/> < a hrefEach element on the page, with jQuery it will have the attributes, and methods that can be used. href and onClick. ben oliver. Ranch Hand.Return false from the click handler. Look up the concept of event propagation and event default action. P.S. If you have a copy of jQuery in Action, read the first few sections of chapter 4. Home Safari jquery a href onClick? Return. Reply: 3.Given your example, I would try changing .load to .ajax and use the following parameters: .ajax( async: false, url: /web, data: id id, success: function() ) (a[href]). The selector is parsed as invalid in jQuery as of version 2.2 and an error is thrown. This is consistent in the latest versions of Safari, Chrome, Firefox and Opera. Also, it seems that this issue is only problem when using as the attribute value in the selector. How to redirect the user from one page to another using jQuery.Create a blank HTML file and put the following example code inside.