I have a problem that is apparently simple but because of my lack of experience I'm getting screwed. It's the following, I'm doing a database listing of a text, and this text already comes with the <p></p>
tags together. This information was registered using Tinymce and it has the option to put background media, but this media comes in a style="background: url('url da imagem')"
and this comes within my <p>
tag. Dai I need to do a style setup with css but I can not affect only the tag containing the style with the background. I tried to use the jQuery addClass and it worked but only if I clicked the <p>
.
--- HTML ----
<p>texto</p>
<p sytle="background: url('exemplo.com')"></p>
<p>outro texto</p>
--- Jquery ---
$(document).ready(function(){
$('p').click(function(){
$(this).addClass('teste')
});
});
---- CSS ---
.teste{
height: 500px
}