My task involves modifying the CSS of a paragraph tag that has a background color of #aaddff.
The code I have written seems to be missing something, as the border is not appearing as expected.
Should I use element.style or is there a different approach I should take?
<script type="text/javascript">
$(function () {
$('p').filter(function () {
return $(this).css("background-color") === "#aaddff";
})
.css("border", "2px solid black");
});
</script>
</head>
<body>
<div>
<p class="test" style="background-color:#aaddff;">Hello</p>
<p class="test" style="background-color:blue;">Hello</p>
<p class="test" style="background-color:#aaddff;">Hello</p>
</div>
</body>