I am creating a table and replacing it in to a div in an aspx page. In that table I have four columns and in each columns i have a particular class. The content of div (ie table) will be changed using $ajax() everytime when a dropdownlist changes it value.I am getting the table and it will be coming inside the div.What i requires is I need to do jquery.hover() in that particular class.So how can i do by giving the class name. I have already tested $.('.ovr')bind(mouseover,mouseout).But this is also not works. Can u pls give a solution?
2 Answers
to bind a "hover" event manually you have to bind the mouseenter and mouseleave events (jQuery's hover documentation mentions that hover actually binds mouseenter and mouseleave event handlers). Something like this should work:
$("...").bind("mouseenter mouseleave", function(e) {
if (e.type == "mouseenter") {
// hover in
} else {
// hover out
}
});
Hope this helps.
$('.ovr').hover(mouseover, mouseout)not work?