I get an error with impromptu ver 4.1 when running under the latest jquery 1.9
Uncaught TypeError: Cannot read property 'msie' of undefined
This was not the case with previous versions of jquery.
The offending line in impromptu is line 20:
var ie6 = ($.browser.msie && $.browser.version < 7);
You could patch Impromptu replacing this line :
var ie6 = ($.browser.msie && $.browser.version < 7);
... by this one :
var ie6 = ( navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6/) );
... so now it can work with jQuery v1.9.0+. Optionally, you could rollback to jQuery v1.8.3
EDIT (March 12th, 2013)
Thanks @johntrepreneur for your comments, you are correct. Two notes:
This edited line :
var ie6 = ( navigator.userAgent.match(/msie/i) && navigator.userAgent.match(/6/) );
... should be replaced by this one :
var ie6 = ( navigator.userAgent.match(/msie [6]/i) );
... my bad, I rushed writing the patch. That should do the trick.
Impromptu has completely removed IE6 support in their last commit (on March 25/2013 after this original post). The issue brought by the OP was that Impromptu did break with jQuery v1.9+ ... updating the Impromptu js file to the last version does also fix the issue.
I prefer this one to target a range, will run code only on < IE9 & jQuery 1.9+
if (/msie [1-8]./.test(navigator.userAgent.toLowerCase()))
{
//code here
}
Ever since Jquery deprecated the $.browser funcionality the easiest way that i found, was to create a global in javascript
var LTE_IE9 = false;
and the in use the condition HTML IE selectors
<!--[if lte IE 9]>
<script>LTE_IE9 = true;</script>
<![endif]-->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With