td.click doesn't fire in jQuery -


i have table:

<table>     <tr class="tools">         <td id="datamenuitem">             <img src="./view/images/database.png" /><br />             data</td>         <td>... 

and jquery-source:

$('#datamenuitem').click(function() {   alert('handler .click() called.'); }); 

why doesn't work?

works here. see example. have tried validate html make sure there no issues there?

oh, , applying click handler within domready event? jquery provides shortcut so:

$(function() {     // code run when dom ready.     $('#datamenuitem').click(function() {         alert('handler .click() called.');     }); });

Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -