Changing css property via jQuery -
what i'm trying achieve here when hover on link turn green.
what wrong code:
<script> $(document).ready(function() { $("a").hover(function() { $(this).css({"background-color": "green;"}); }); }); </script>
it's semicolon after green;
, works in css, not in javascript, expects color only, no semicolon.
$(document).ready(function() { $("a").hover(function() { $(this).css({"background-color": "green"}); }); });
Comments
Post a Comment