Let say I have my HTML code look like this:
<p class="p">Paragraph</p>
<p class="p p2">Paragraph 2</p>
<p class="p p3">Paragraph 3</p>
If I use: $('.p').css('color','red')
, this will apply red color to all paragraphs.
How can I apply the style to paragraph that only has class p
which is first paragraph in this case?