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

Popular posts from this blog

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

python 2.7 - Lines in my code being skipped and I am not sure why -

python - multiprocessing pool with map -