I have this:
(function ($, window) {
$.widget("mobile.multiview", $.mobile.widget, {
options: {
$lowerThresh: 320,
$upperThresh: 768
},
framer: function () {
var self = $(this);
if ($.mobile.media("screen and (max-width:320px)") || ($.mobile.browser.ie && $(window).width() < self.options.$lowerThresh)) {
var framed = "small";
} else if ($.mobile.media("screen and (min-width:768px)") || ($.mobile.browser.ie && $(window).width() >= self.options.$upperThresh)) {
var framed = "large";
} else {
var framed = "medium";
}
console.log(framed);
}
})(jQuery, this);
This works fine in all browser, only on IE8 it returns self.options.$lowerThresh is null or not an object.
Any idea, why this could be? I’m using Jquery 1.7.1 and Jquery Mobile 1.1.
Thanks for help!
Got it.
should be:
Then IE plays along.