If an element contains this element then remove class
by jelane20
HTML
<span style="width:500px;text-align:center;" class="personalImage"><object width="500" height="260"><param value="http://www.youtube.com/v/ElJPr-1xlUI" name="movie"><param value="true" name="allowFullScreen"><param value="always" name="allowscriptaccess"><param value="opaque" name="wmode"><embed width="500" height="260" wmode="opaque" allowfullscreen="true" allowscriptaccess="always" type="application/x-shockwave-flash" src="http://www.youtube.com/v/ElJPr-1xlUI"></object></span>
<span class="test"><b>this is a test</b></span>
CSS
.test {
display: none;
}
JavaScript
$('span:has(object)').removeClass('personalImage');
//example 2
$('span:has(b)').removeClass('test');