我在IE6上遇到了一个小问题,它不会出现在Chrome或Safari或Firefox上。一切正常,除了一件事:我的Web应用程序定义了一个构造函数/原型,我从中创建了多个这样的实例:
var app = {};
app.mapConceptFirst = new MapConcept("#first");
app.mapConceptSecond = new MapConcept("#second");
app.mapConceptThird = new MapConcept("#third");
这是构造函数:
function MapConcept(id) {
this.currentNavigator = "";
this.start = 0;
this.angle = 0;
this.clientX = 0;
this.clientY = 0;
this.currentMenu = 2;
this.h = 0;
this.w = 0;
this.itemList;
this.firstRotation = 0;
this.section = id;
$(window).resize(function () {
this.h = $(window).height();
this.w = $(window).width();
});
jQuery.preLoadImages("images/anneau.png", "images/anneau1.png", "images/anneau2.png", "images/anneau3.png", "images/anneau4.png");
this.currentNavigator = BrowserDetect.init();
this.init();
this.getItems();
}
不幸的是,在IE6上,第一个实例工作正常,我的所有东西都在运行,但第二个和第三个实例都不起作用。我怎样才能解决我的问题?