I am trying to use this jQuery click() function and for some arcane reasons it keeps on failing on some apparent syntactical error. I am not sure why. Below is my code snippet:
$(document).ready(function () {
$('.Trial').click(function () {
alert("User clicked on Trial Object");
});
});
I am not sure what is wrong with it.
The code you posted worked fine: http://jsfiddle.net/jasper/xDGgh/
Check your error log for a specific error or line number. Try to comment-out different blocks of code to find the error (if you comment-out the code with the error, the rest of your JS will work). Developing with a browser that has good developer tools is extremely helpful; Firebug is a great add-on for Firefox.