jquery OnHoverOver and OnHoverOut
I have an asp.net animation extendeer like this:
aspext:AnimationExtender ID="extender" TargetControlID="Panel1" runat="server">
Animations>
OnLoad>StyleAction Attribute="backgroundColor" Value="red" />/OnLoad>
OnClick>StyleAction Attribute="backgroundColor" Value="blue" />/OnClick>
OnMouseOver>StyleAction Attribute="backgroundColor" Value="pink" />/OnMouseOver>
OnMouseOut>StyleAction Attribute="backgroundColor" Value="yellow" />/OnMouseOut>
OnHoverOver>StyleAction Attribute="color" Value="orange" />/开发者_Go百科OnHoverOver>
OnHoverOut>StyleAction Attribute="color" Value="purple" />/OnHoverOut>
/Animations>
/aspext:AnimationExtender>
I want to perform OnHoverOver and OnHoverOut using jquery. what are the events for these. I tried hover but it is not working. Basically I am calling jquery triggerevent and I need to pass event name. I am not sure what will be events names for these two. I tried others like click etc and they worked.
Try this :
$('#selector').hover(function(){
//do something, this is for hoverover
},function(){
//do something this is for hoverout
})
next method :
$("#selector").mouseover(function(){
//do something, for hoverover
}).mouseout(function(){
//do something, for hoverout
});
another method :
$("#selector").mouseenter(function(){
//do something, for hoverover
}).mouseleave(function(){
//do something, for hoverout
});
精彩评论