jQuery preventDefault() not triggered

Update And there’s your problem – you do have to click event handlers for some a elements. In this case, the order in which you attach the handlers matters since they’ll be fired in that order. Here’s a working fiddle that shows the behaviour you want. This should be your code: Note that the order of attaching the handlers has been … Read more

jQuery.click() vs onClick

Using $(‘#myDiv’).click(function(){ is better as it follows standard event registration model. (jQuery internally uses addEventListener and attachEvent). Basically registering an event in modern way is the unobtrusive way of handling events. Also to register more than one event listener for the target you can call addEventListener() for the same target. http://jsfiddle.net/aj55x/1/ Why use addEventListener? (From MDN) addEventListener is the way to register an event listener as specified in W3C DOM. Its … Read more

Failed to load resource: the server responded with a status of 500 (Internal Server Error) in Bind function

The 500 code would normally indicate an error on the server, not anything with your code. Some thoughts Talk to the server developer for more info. You can’t get more info directly. Verify your arguments into the call (values). Look for anything you might think could cause a problem for the server process. The process … Read more