views:

151

answers:

1

Hi, I try to use the simplmodal script from: http://www.ericmmartin.com/projects/simplemodal/

I got this error $.support.boxModel is not NULL.. in IE8.

jquery.simplemodal-1.3.4.min.js?F

This is my implementation scipt.. what I have to change to avoid this error?

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);
  });
});
+1  A: 

I have a fix tht I need to release. Until then, you can edit SimpleModal and change:

$.support.boxModel

to:

$.boxModel

-Eric

Eric Martin
Thanks Eric, I have the same issue with IE7 and this fixed it. Btw, love your plugin, it is so easy to use.
Emon