In this article, we will see how to write code to select all links inside the paragraph using jQuery. To select all links inside paragraph element, we use parent descendant selector. This selector is used to selects every element that are descendant to a specific (parent) element.
Approach: Here, we have created links and content inside paragraph element. After that, we use $(“p a”) selector to select all links inside paragraph element and changes its style using css() method.
Please Login to comment...