When minifying JavaScript in the handy tool by Google called Closure Compiler it gives the following error (and doesn't minify a thing):
Number of errors: 1 JSC_TRAILING_COMMA: Parse error. IE8 (and below) will parse trailing commas in array and object literals incorrectly. If you are targeting newer versions of JS, set the appropriate language_in option. at line 389 character 1 in all.js
theme : 'default', // The theme of the slider (default, theme1, theme2, t...
$(window).load(function(){
jQuery('#slider1').autoSlider({
theme : 'default', // The theme of the slider (default, theme1, theme2, theme3)
width : '960', // The width of the slider, 100% for auto full width, set to 0 it will take the width of the largest image
autoHidePlayBtn : true, //
The fault (for fear of simply rewording what the Closure Compiler error says) is that IE8 and below cannot parse object literals and array literals which have a trailing comma.
var obj = {
a: 1,
b: 2, // trailing comma is bad!
};
... vs...
var obj = {
a: 1,
b: 2 // no trailing comma!
};
The fix is to remove the trailing comma.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With