githubashto / enhancejs

Automatically exported from code.google.com/p/enhancejs
Other
0 stars 0 forks source link

internet explorer media is null or not an object #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to use enhance.js to load scripts only on desktops :

http://dl.dropbox.com/u/426954/allora/index.html

<script>
enhance({
loadScripts: [
{media: 'screen', excludemedia: 'screen and (max-device-width: 480px)', src: 
'js/jquery-1.5.min.js'},
{media: 'screen', excludemedia: 'screen and (max-device-width: 480px)', src: 
'js/jquery.cycle.lite.min.js'},
{media: 'screen', excludemedia: 'screen and (max-device-width: 480px)', src: 
'js/script.js'},
]       
}); 
</script>

but I get this error in Internet Explorer 8 :

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; 
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; 
.NET4.0C; .NET4.0E; Media Center PC 6.0)
Timestamp: Sun, 6 Feb 2011 13:05:48 UTC

Message: 'media' is null or not an object
Line: 7
Char: 8741
Code: 0
URI: http://dl.dropbox.com/u/426954/allora/js/enhance.min.js

thanks for any suggestions

Original issue reported on code.google.com by pauldewo...@gmail.com on 6 Feb 2011 at 1:11

GoogleCodeExporter commented 9 years ago
ok, there was an extra comma in my code. you can mark this a fixed

thanks

Original comment by pauldewo...@gmail.com on 8 Feb 2011 at 11:36