【问题标题】:Galleria Fullscreen not working on IEGalleria Fullscreen 无法在 IE 上运行
【发布时间】:2012-05-09 13:39:00
【问题描述】:

我正在使用 Drupal 7 和 Galleria 1.2.6 并且有全屏主题。我的画廊在 Firefox 上工作。但是当点击全屏图片在 IE 上不起作用。

问题线:

 this.setStyle(this.get('iefix'), {

完整的代码:

  if (Galleria.IE) {
            this.addElement('iefix');
            this.appendChild('container','iefix');  
            this.setStyle(this.get('iefix'), {
                zIndex:3,
                position:'absolute',
                backgroundColor: '#000',
                opacity:.4
            })
        }

错误日志:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
Timestamp: Wed, 9 May 2012 13:43:16 UTC


Message: Object doesn't support this property or method
Line: 39
Char: 13
Code: 0
URI: http://mysite.com/sites/all/libraries/galleria/themes/fullscreen/galleria.fullscreen.js

我该如何解决这个问题?

【问题讨论】:

  • 什么问题?显示错误日志。
  • 网页错误详情用户代理:Mozilla/4.0(兼容;MSIE 8.0;Windows NT 6.1;Trident/4.0;SLCC2;.NET CLR 2.0.50727;.NET CLR 3.5.30729;.NET CLR 3.0.30729;Media Center PC 6.0) 时间戳:2012 年 5 月 9 日星期三 13:43:16 UTC 消息:对象不支持此属性或方法行:39 字符:13 代码:0 URI:mysite.com/sites/all/libraries/galleria/themes/fullscreen/…
  • 那么那个 js 文件的第 39 行是什么?
  • this.setStyle(this.get('iefix'), {

标签: php jquery drupal galleria


【解决方案1】:

似乎setStyle 和 IE8 并不能很好地工作。可能有解决办法there

很快就会将this.setStyle 替换为Element.setStyle,但您可能需要查看galleria 论坛以确保您获得相同的版本或向他们询问此问题。

【讨论】:

  • @user1213807 你可能想在使用函数之前检查它们,所以在setStyle(this.get('iefix... 周围你可能想添加if (this.setStyle && this.get) { 但这可能会破坏为 IE 所做的修复
  • 你确定不使用缓存的 js 吗?因为 if 至少应该避免错误。您可以尝试发出警报或删除整个 if (GALLERIA.IE) 块来检查。
猜你喜欢
  • 1970-01-01
  • 2011-11-08
  • 1970-01-01
  • 1970-01-01
  • 2010-11-25
  • 2013-08-31
  • 2015-04-20
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多