TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
JQuery script to get nice style on a button
Sateesh Arveti
Jul 02, 2010
8.7
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Below script gives nice mouseover effect for a button
<style type="text/css">
.btn
{
color: black;
font: bold 95% 'trebuchet ms' ,helvetica,sans-serif;
background-color: white;
border: 1px solid;
border-color: #696 #363 #363 #696;
filter: progid:DXImageTransform.Microsoft.Gradient (GradientType=0,StartColorStr= 'white' ,EndColorStr= '#ffeeddaa' );
}
.btnhov
{
background-color: orange;
font: bold 95% 'trebuchet ms' ,helvetica,sans-serif;
filter: progid:DXImageTransform.Microsoft.Gradient (GradientType=0,StartColorStr= 'orange' ,EndColorStr= 'orange' );
border: 1px solid;
border-color: #696 #363 #363 #696;
color: White;
}
</style>
<script type="text/javascript">
$(function() {
$('input[type="button"]').attr('class', 'btn');
$('input[type="button"]').mouseover(function() { $(this).attr('class', 'btnhov'); });
$('input[type="button"]').mouseout(function() { $(this).attr('class', 'btn'); });
});
</script>
JQuery script to get nice style on a button
Next Recommended Reading
Dynamically Adding And Removing TextBoxes On A Button Click Using jQuery