【问题标题】:simplemodal - IE8 $.support.boxModel is not NULL and no objectsimplemodal - IE8 $.support.boxModel 不是 NULL 也没有对象
【发布时间】:2010-04-08 11:59:15
【问题描述】:

我尝试使用来自:http://www.ericmmartin.com/projects/simplemodal/ 的 simplmodal 脚本

我在 IE8 中收到此错误 $.support.boxModel is not NULL..。

jquery.simplemodal-1.3.4.min.js?F

这是我的实现 scipt.. 我必须更改什么以避免此错误?

function loadIframe(url){
  $.modal('<iframe src="' + url + '" height="700px" width="600px" scrolling="no">', {
    containerCss:{
        backgroundColor:"#fff",
        borderColor:"#333",
    },
    overlayClose:true,
    opacity:70,
    overlayCss: {
        backgroundColor:"#000"
    },
    onOpen: function (dialog) {
    dialog.overlay.fadeIn('slow', function () {
        dialog.container.toggleClass("preloader"); 
        dialog.data.hide();
        dialog.container.fadeIn('slow', function () {
          dialog.container.toggleClass("preloader");
          dialog.data.slideDown('slow');
        });
        });
    },
    onClose: function (dialog) {
    dialog.data.fadeOut('slow', function () {
        dialog.container.slideUp('slow', function () {
            dialog.overlay.fadeOut('slow', function () {
                $.modal.close(); // must call this!
            });
        });
      });
    }
  });
}

$(document).ready(function(){
  $("img").click(function(){
  var baseurl = location.host;
  var url = $(this).attr("target");
  var url = 'http://' + baseurl + url;
  loadIframe(url);
  });
});

【问题讨论】:

  • 我在这里猜测,但这要么是 IE8 的问题,要么是 jQuery 版本的问题。确保你有适合插件的 jQuery 版本,并查看你的代码是否可以在其他浏览器中运行...

标签: jquery internet-explorer-8 simplemodal


【解决方案1】:

我有一个需要发布的修复程序。在此之前,您可以编辑 SimpleModal 并进行更改:

$.support.boxModel

到:

$.boxModel

-埃里克

【讨论】:

  • 感谢 Eric,我在 IE7 上遇到了同样的问题,这解决了它。顺便说一句,喜欢你的插件,它很容易使用。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-01
  • 2012-10-13
  • 2021-05-19
  • 2021-09-11
  • 2013-08-05
  • 1970-01-01
相关资源
最近更新 更多