Possible Duplicate:
How to bind a function to Element loaded via Ajax
in my application I want to populate an info panel onmouseover of some cell and highlight the cell so that the user can see which cell. I used the following js and css, which worked well for cells that exist when the page is first loaded
$(document).ready(function(){
$("table1 td").hover(function(){
$("table1 td").removeClass('highlight');
$(this).addClass('highlight');
});
});
and highlight
.highlight{
border-style:outset;
border-width:5px;
border-color:#0000ff;
}
But in my application the table1 td are generated by a wicket listview and will be updated via Ajax when the user does a search. And after an Ajax update those js code had no effect. How can I make those js code still work after Ajax update? I really appreciate any help!