Using :before via Jquery
<p>I have the current issue: I define via CSS the current role for a <code>div</code> element  </p>

<pre><code>.divElement:before {
    background-image: url(../images/triangle.png);
    background-repeat: no-repeat;
    content: "";
    height: 20px;
    left: 62%;
    margin: 0 0 0 -50px;
    position: absolute;
    top: -20px;
    width: 100px;
}

.divElement{
    background: none repeat scroll 0 0 #FFF8D6;
    border-radius: 10px 10px 10px 10px;
    color: black;
    font: 1em/1.4 Cambria,Georgia,sans-serif;
    margin: 0px 500px 3em;    
    padding: 15px;
    position: relative;
    text-align: center;
}
</code></pre>

<p>I created this element dynamically using jQuery: <code>$('&lt;div class="divElement"&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/div&gt;').appendTo(....)</code> this works correctly. The issue becomes when using jQuery and I try to dynamically change the <code>backgroung-image</code> and the <code>top</code> attribute of the content before the <code>divElement</code> (which I define in CSS with <code>:before</code>)</p>

<p>I tried something like this for the <code>background-image</code>, but doesn't work: </p>

<pre><code>$('.divElement:before').css('background-image', 'url(../images/triangle_reverse.png)');
</code></pre>

<p>How can I do that? Thank to all !!!</p>
