Advertisement
arif11015

jQuery :nth-of-type() 3rd child selector

May 4th, 2021
1,140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.64 KB | None | 0 0
  1. <h1>This is a heading in body</h1>
  2.  
  3. <p>The first paragraph in body.</p>
  4. <p>The second paragraph in body.</p>
  5.  
  6. <div style="border:1px solid;">
  7.   <span>This is a span element in div</span>
  8.   <p>The first paragraph in div (and the 3rd child in div, counting from the last child).</p>
  9.   <p>The second paragraph in div.</p>
  10.   <p>The last paragraph in div.</p>
  11. </div><br>
  12.  
  13. <div style="border:1px solid;">
  14.   <p>The first paragraph in another div (and the 3rd child in this div, counting from the last child).</p>
  15.   <p>The second paragraph in another div.</p>
  16.   <p>The last paragraph in another div.</p>
  17. </div>
  18.  
  19. <p>The last paragraph in body.</p>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement