开发者

Help me fixing IE 7 Javascript error [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜