CSS Manipulation

<p id="colorText">Change my color!</p>
<button id="colorBtn">Change Color</button>

<script>
$(document).ready(function(){
  $("#colorBtn").click(function(){
$("#colorText").css("color", "blue");
}); }); </script>

.css() is used to change or read CSS properties.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *