[jQuery] Hover in a loaded page stopped working??
Hi all,
I am stuck with this in a page showContent.php i have
<code>$(document).ready(function() {
$("table#test tr.edit").hover(function(){$(this).addClass
("hover");},function(){$(this).removeClass("hover");});
});</code>
and this works in showContent.php. Just a simple grey background color
on rollover
But when i load showContent.php like so
<code>
$(document).ready(function() {
$("#content").css("overflow-y", "hidden");
$("#show").click(function() {
$("#content").css("overflow-y", "scroll");
$("#content").load("showContent.php");
});
});</code>
the hover color stop working???
edit
i am trying a callback function without success
$("#content").load("showContent.php", UI());
function UI() {
alert('reini');
$("#content table#test tr.edit").hover(function(){$(this).addClass
("hover");},function(){$(this).removeClass("hover");});
}
Any tips?