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

java - SSE Emitter : Manage timeouts and complete() -

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

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -