I have a save button, and when the user changes above it, I change some styles - for example:
$('.saveButton').mouseover(function() {
$(this).css("background-color", "red");
$(this).parents('fieldset').css("border", "2px solid red");
});
When the mouse leaves the button, I would like to restore the original:
$('.saveButton').mouseout(function() {
$(this).css("background-color", "#EEE");
$(this).parents('fieldset').css("border", "1px solid gray");
});
However, leaving aside the question of whether the default background color of the button is #EEE, when this code executes the button, it loses its rounded appearance and has square corners.
Can this be done?
chris source
share