<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.
Leave a Reply