Jquery image in div, makes the code act strange
<p>Hey there, third related question to this code, hopefully the final one:).</p>

<p>This code seems to work pretty smooth:</p>

<pre><code>$(document).ready(function(){

$(".photo").mouseenter(function() {

 $(this).html('&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0" width="170" height="125"&gt;&lt;param name="movie" value="http://static.awempire.com/flash/live_feeds/live_feed.swf" /&gt;&lt;param name="quality" value="high" /&gt;&lt;param name="wmode" value="transparent" /&gt;&lt;param name="flashvars" value="appletroot=http://static.awempire.com/flash/live_feeds/&amp;appletskin=template8/template01.swf&amp;appletcol=900000&amp;psid=ddany23&amp;campaign_id=20520&amp;pstour=t1&amp;psprogram=REVS&amp;site=jsm&amp;flags=137438953473,137438953504,1,32&amp;lp_lang=auto" /&gt;&lt;embed src="http://static.awempire.com/flash/live_feeds/live_feed.swf" width="170" height="125" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" flashvars="appletroot=http://static.awempire.com/flash/live_feeds/&amp;appletskin=template8/template01.swf&amp;appletcol=900000&amp;psid=ddany23&amp;campaign_id=20520&amp;pstour=t1&amp;psprogram=REVS&amp;site=jsm&amp;flags=137438953473,137438953504,1,32&amp;lp_lang=auto"&gt;&lt;/embed&gt;&lt;/object&gt;');
});

$(".photo").mouseleave(function() {
  $(this).html('ffff');
});
</code></pre>

<p>The problem is .photo div (i have 10 different divs)</p>

<p>If photo div is empty, or has plain text inside, everything works fine.
BUT, if i have a photo inside photo div, which on mouseenter will be replaced with the flash movie, everything brakes, the movie isn't loaded properly and it isn't replaced promptly with "fff" on mouseleave.</p>

<p>The link is to an adult site, unfortunately I can't provide this here as it is against the rules and may be considered offensive and unsuitable for all audiences.</p>

<p>Thank u!</p>

<p>If i delete everything inside .photo, the above code works perfectly. If a live the link, it works to.. only if i put an image, it brakes the code.</p>

<p>PS. here is the html code, it's on wordpress index.php</p>

<pre><code>&lt;div class="section"&gt;&lt;!-- Start Section --&gt;

&lt;div class="photo"&gt;&lt;!-- Start Photo --&gt;
    &lt;div class="transparency"&gt;&lt;/div&gt;
    &lt;div class="performer"&gt;&lt;p&gt;&lt;? echo $perf; ?&gt;&lt;/p&gt;&lt;/div&gt;
    &lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;? echo ''.$perf.''; ?&gt;'s bio - &lt;? echo ''.get_the_title().''; ?&gt;"&gt;&lt;img src="&lt;? echo ''.$pic.''; ?&gt;" width="180" height="135" alt="&lt;? echo ''.get_the_title().''; ?&gt;" style="display:block"/&gt;&lt;/a&gt;
&lt;/div&gt;&lt;!-- End Photo --&gt;

&lt;div class="left"&gt;&lt;!-- Start left --&gt;
    &lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;? echo ''.$perf.''; ?&gt;'s Bio Page and Live Cam"&gt;Bio Page&lt;/a&gt;
&lt;/div&gt;&lt;!-- End Left --&gt;

&lt;div class="right"&gt;&lt;!-- Start Right --&gt;
    &lt;a href="the linkx" target="_blank" title="Free Chat with &lt;? echo ''.$perf.''; ?&gt; " rel="nofollow"&gt;Free Chat&lt;/a&gt;
&lt;/div&gt;&lt;!-- End Right --&gt;
</code></pre>

     

<p></p>
