You must Sign In to post a response.

Jqyery button

jqyery buttons tutorials. i want if my mouse go over on button then button color change otherwise not.


Comments

Author: Shekar.Y18 Mar 2011 Member Level: Gold   Points : 3

You can use the onmouseover, onmouseout javascript events for handling the such scenarios.

Refer to the following link which explains about change the background color of an achortag using onmouseover.

http://www.daniweb.com/web-development/web-design/html-and-css/code/216435

Hope this could help you.

Author: Karthick NS18 Mar 2011 Member Level: Bronze   Points : 4

Hi rohit,

Need not to write jquery codings for this. Use CSS files you can change the color of the button.

For ex:











But Internet Explorer 6 doesn't support hover class of CSS.

if you want in jquery,


<script>
$("#btnOk").mouseover(function(event){
$("#btnOk").removeClass( "normalButton" );
$("#btnOk").addClass( "hoverButton" );
});

$("#btnOk").mouseout(function(event){
$("#btnOk").removeClass( "hoverButton" );
$("#btnOk").addClass( "normalButton" );
});
</script>
Thanks & Regards,
Karthick NS


Sign In to post your comments