<p>I want to change a flash object enclosed within  with jQuery after an onClick event. The code I wrote, essentially:</p>

<pre><code>$(enclosing div).html('');
$(enclosing div).html(&lt;object&gt;My New Object&lt;/object&gt;);
</code></pre>

<p>works in Firefox but not in IE. I would appreciate pointers or suggestions on doing this. Thanks.</p>

The
```
empty()
```
method is the better way of deleting content. Don't know if that will solve your problem though :)
```
```
$('#mydiv').empty();
```
```
You could also try the
```
replaceWith(content)
```
method.