dostaję następujący błąd podczas korzystania z IE 9 (Chrome i Firefox działa świetnie):SimpleModal nie działa w IE 9 (wewnątrz iframe)
SCRIPT438: Obiekt nie obsługuje właściwości lub metody " removeExpression” jquery.simplemodal.1.4.2.min.js, linia 16 znaków 133
Proste Modal nazywa się wewnątrz iframe. jQuery.min (1.7.1) jest zawarty przed SimpleModal (1.4.2) w elemencie iframe.
Kod odpowiedzialny za pokazywanie okno modalne:
function OpenContextByClass(cssClass, posY, posX) {
var winHeight = $(window).height();
var winWidth = $(window).width();
$('.' + cssClass).modal({
overlayClose: true,
position: [posY, posX],
appendTo: 'form',
onOpen: function (dialog) { dialog.overlay.fadeIn('fast', function() { dialog.container.slideDown('fast', function() { dialog.data.fadeIn('fast'); }); }); },
onShow: function (d) {
var self = this;
self.container = d.container[0];
var title = $('.' + cssClass, self.container);
title.show();
$('.' + cssClass, self.container).show();
setTimeout(function() {
var currentPositionX = posX;
var currentPositionY = posY;
var currentWidth = $('.' + cssClass, self.container).width() + 50;
var currentHeight = $('.' + cssClass, self.container).height() + 50;
posY = (currentPositionY + currentHeight) < winHeight ? currentPositionY : (winHeight - currentHeight);
posX = (currentPositionX + currentWidth) < winWidth ? currentPositionX : (winWidth - currentWidth);
d.container.animate(
{ left: posX, top: posY },
500,
function() {
$('.' + cssClass, self.container).show();
}
);
}, 550);
}
});
}
Simple Modal działa dobrze dla mnie w IE9 z jQuery 1.7.1, ale zrywa, gdy aktualizuję jQuery do 1.8.0. Czy jesteś pewien, że używasz 1.7.1? –
Otworzyłem podobny, ale nieco inny problem, http://stackoverflow.com/q/12046242/141172 –
@Eric J. Nie mam teraz dostępu do projektu. Ale myślę, że było 1.7.1. – Ranaghar