jQuery.extend not working in Internet Explorer, but works in Firefox
- by Jared Stark
I am attempting the following:
var Class1 = function() {}
Class1.prototype = {
MyMethod: function() { /* Do Stuff */ }
}
var Class2 = function() {}
Class2.prototype = {
AnotherMethod: function() { /* Do More Sweet Stuff */ }
}
jquery.extend(true, Class1, Class2);
I should now expect to be able to do the following:
var c = new Class1();
c.AnotherMethod();
In Firefox 3.6 this works just fine. In Internet Explorer 7 & 8 it says "Object doesn't support this property or method".
Am I misunderstanding how $.extend should work, or is IE behaving badly?
jQuery Version: 1.3.2
Thanks!