views:

10

answers:

1

Hello I'm having problems with a featured content area breaking the site in IE7 which is causing the splash to display above the content (as its also jquery).

<script type="text/javascript" src="/site/3/design/js/featurebar.js"></script>
<script type="text/javascript">
    //<!--
   jQuery( function(){ ModelIt.FeatureBar.init() } );
    //-->
</script>

ModelIt is defined inside featurebar.js

Every other browser, the above works fine, in ie7 I get ModelIt is undefined...Any ideas of a work around?

Here is a test page: http://www.prowler.tv/scripts/test.php - I get object unexpected in IE7.

A: 

Change

if (!ModelIt)

to

if (!window['ModelIt'])

and see if that helps.

Pointy
Didnt help, but I just noticed it says line 38. Line 38 of the JS is :}).mouseleave(function(){ which doesnt make a whole lotta sense.
azz0r
Don't pay attention to IE6 or 7 error messages. You can use "try/catch" blocks to narrow down the code that's actually causing the error.
Pointy
Updated the first post, its defined properly in the js file but for some reason ie7 doesnt keep it?
azz0r
Well that doesn't make much sense. You should post more of the code that supposedly defines the global variable, and the code where the error occurs.
Pointy