I have the following html...
<div id="q">
<dl>
<dt><p>lorem ipsum</p></dt>
<dd><span>lorem ipsum</span></dd>
<dd><span>lorem ipsum</span></dd>
<dd><span>lorem ipsum</span></dd>
<dd><span>lorem ipsum</span></dd>
</dl>
</div>
And this is extremely required css for my case...
#q dd:before{
content: " ";
/*height: 65px;*/
}
But the height is needed to be created as per the contents as if the height is dynamic. Thus, I need to create it with jQuery....
//for test
var h = '65px';
//problem occurs here
$('#q dd:before').css('height',h);
When you inspect it, the height is not added in the #q dd:before
selector.
Seems :before
and :after
pseudo classes are not supported with jQuery.
Do you have any idea with jQuery or javascript?