Can I use CSS in JQuery to change a div
's color slowly? Oh and one more thing, how can I add a second function to my <div>
. Here is the code. I want to change the color back to the old one when mouseout
happens.
<script>
function myFunction() {
$(document).ready(function () {
$("#square").css({ backgroundColor: 'blue' });
});
}
</script>
<div id="square" onmouseover="return myFunction()">Focus on me!</div>