apply CSS style to particular elements dynamically

Posted by WHITECOLOR on Stack Overflow See other posts from Stack Overflow or by WHITECOLOR
Published on 2012-06-26T09:11:40Z Indexed on 2012/06/26 9:15 UTC
Read the original article Hit count: 176

Filed under:
|
|

I have a div with paragraphs inside:

<div>
  <p>...</p>
  <p>...</p>
</div>

I want dynamically to apply a certain style to paragraphs inside this div. Is it possible to do that without handling each paragraph element, but just attach somehow style to div element and all inside paragraphs would be affected?

Maybe with jquery.

It sounds for me like dynamical change of the stylesheet, is it possbile?

Thanks.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery