I have this table:
<table>
<tr class="tools">
<td id="dataMenuItem">
<img src="./view/images/database.png" /><br />
Data</td>
<td>...
And this jQuery-Source:
$('#dataMenuItem').click(function() {
alert('Handler for .click() called.');
});
Why doesn’t it work?
Works here. See example. Have you tried to validate your HTML to make sure there are no issues there?
Oh, and are you applying the click handler within a domready event? jQuery provides a shortcut for it like so: