I ve got a html page with only a table with two rows and i want to add an dobleclick event via jQuery. My problem is that this code don´t run, but if i use javascript console of chrome and type manually the code, code runs.
$(document).ready(function () {
$('tr').dblclick(function(){
alert('Row dblclicked');
});
}
What’s the problem?
The issue is because you are not ending your parentheses for
$(document).ready()You are missing
);right at the end of your script.Try changing your code to:
http://jsfiddle.net/Curt/SQzt6/4/