Read the latest web development and design tips at Fred Wu's new blog! :-)
Poke me on GitHub

Posts Tagged ‘SWFObject’

jQuery problems in IE? It could be SWFObjects.

So your jQuery/JavaScript code doesn’t have any errors, yet your site isn’t working as expected in Internet Explorer? It could be that you have some SWFObject code interfering with your jQuery code (if for example, you’re using a Flash video player or something along those lines). The solution is very simple. Simply enclose your SWFObject code in a jQuery $(document).ready() as so:

<script type="text/javascript">
        var so = new SWFObject("movie.swf", "mymovie", "400", "100%", "8", "#336699");
        so.addParam("quality", "low");
        so.addParam("wmode", "transparent");
        so.addParam("salign", "t");

The only downside to this is that if you have some alternate HTML to show when Flash isn’t present, this text will be shown until the document is fully loaded and the player(s) start to render (even if the user does in fact have Flash installed).

Related posts