Problems with .delegate() on table populated with .tmpl()
Hi all,
I'm using jQuery 1.4.4 and I can't understand where I'm doing wrong, I'm simply populating all the rows of a table with template function, so far so good, but I cant delegate the "hover" (and click and all the events) event on a row or a cell.
I've tried to put the .delegate() code also in the footer of my page but nothing.
Do you know there are some problems?
My code actually is:
- <script id="listTemplate" type="text/x-jquery-tmpl">
- <tr>
- <td>${item}</td>
- </tr>
- </script>
- <table id="list-table">
- <tr>
- <th>Item</th>
- </tr>
- <tbody id="list-grid"></tbody>
- </table>
- $("#list-table").delegate("#list-grid tr", "hover", function() {
- console.log('Some text here');
- });