Help me fixing IE 7 Javascript error [closed]
I have setup Ad Gallery (Jquery based gallery plugin, see http://开发者_StackOverflowcoffeescripter.com/code/ad-gallery/ ) on a website I'm developing. Everything works just fine in recent browsers.. the only problem is with IE7 which throws a JS error and stops executing the script.
I don't have access to debugging utils for IE7 so I can't really investigate into the problem.
I think I found why. Here's the block of js where it crashes:
Drupal.behaviors.ad_gallery = {
attach: function(context) {
//alert(Drupal.settings.ad_gallery.style);
var galleries = $('.ad-gallery').adGallery({
animation_speed: parseInt(Drupal.settings.ad_gallery.animation_speed),
display_next_and_prev: Drupal.settings.ad_gallery.display_next_and_prev,
display_back_and_forward: Drupal.settings.ad_gallery.display_back_and_forward,
slideshow: {
enable: Drupal.settings.ad_gallery.ss_enable,
autostart: Drupal.settings.ad_gallery.ss_autostart,
}
});
...
Do you have control over this piece of js code? I suspect the issue is in the line where 'autostart' is set. Are you able to remove that comma at the end?
Change:
autostart: Drupal.settings.ad_gallery.ss_autostart,
to:
autostart: Drupal.settings.ad_gallery.ss_autostart
精彩评论