Blue Theme Orange Theme Green Theme Red Theme
 
Home | Forums | ASP.NET 2.0 Tutorials | Web Services | How Do I...? | Class Browser | WPF Quick Starts | Advertise with Us
 | Consulting  
Submit an Article Submit a Blog 
Search :       Advanced Search »
Home » Blogs Home » Blog Detail

Hover Event in jQuery

 by Anil Kumar on May 05, 2011

Doing mouse Over as well off job in jQuery by using hover event.
Comments: 0 Views: 1006 Printable Version 

 jQuery is very powerful as it says write less and do more....

We can get done our two job in its single hover event. The syntax of hover is as-

hover (parameter1   ,   parameter2)

                       |                          |________  On Mouse Off

                       |___________   On Mouse Over                                                        


 Lets see it in an example. Suppose we want to get  change a button color when mouse is on over. Say button id is 'btnOk' . So below line of code will do this -                                                                        

    $('#btnOk').hover(  function(){ $(this).css('color','blue');  }

                      , function(){ $(this).css('color','green'); }

                      );

 

Note: There are many jQuery articles on CsharpCorner and this blog is just a small seed but it will make interest for using jQuery who are not familiar with it.

Comment Request!
Thank you for reading this post. Please post your feedback, question, or comments about this post Here.
 
What do you say about this post? Post a comment here
*Title:
*Comment:
 
Comments not available.
Team Foundation Server Hosting
Become a Sponsor

 Blogger's Profile
Age: Not Available
Location:
Title: Developer
Joined: Dec 05, 2010
Education: Bachelors Degree
 More Blogs from this Blogger
No record available
 Latest Blogs
[Video] OnClose Handler
[Video] Storing and Loading the Window and Toolbar position
The Euclidean Algorithm
Swapping Exe Process
How Exe file is Generated by VS2005 C++ Project?
What is Exe
Header files: Multiple Inclusion problem - Solution B
Header files: Multiple Inclusion problem - Solution A
Header files: Multiple Inclusion problem - Reason
Header files: Multiple Inclusion problem
View all »
 Latest Jobs
More ... 
 Latest Interview Questions
More ... 

 © 2012  contents copyright of their authors. Rest everything copyright Mindcracker. All rights reserved.