jQuery – Add CSS Properties to an Element

Code

1
2
3
4
5
6
<script>
$(document).ready(function() {
  $(".newcolor").css('color', 'blue');
});
</script>
<div class="newcolor">some dummy texts here..</div>

Result

some dummy text here..