Thursday, 15 April 2010

javascript - lab.js jquery selection for different ie version -



javascript - lab.js jquery selection for different ie version -

i'm using lab.js load scripts:

$lab .script("http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js").wait() .script("script.js") .and_many_more_scripts;

as jquery v2 doesn't back upwards ie8, need conditions load jquery 1.11 instead of v2 if user uses ie8.

right now, i'm using this:

<!--[if lt ie 9]> <script src="html5.js"></script> <![endif]-->

but don't know how utilize lab.js. have utilize finish lab-call every case?

<!--[if lt ie 9]> <script> $lab .script("html5.js") .script("http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js").wait() .script("script.js") .and_many_more_scripts;</script> <![endif]--> <!--[if gt ie 8]> <script> $lab .script("http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js").wait() .script("script.js") .and_many_more_scripts; </script>

ended here looking other ie8 issue, hope figured out problem now.

but in case else needs, worked me:

$lab.script((document.documentmode == 8) ? "ie8scripturlgoeshere":"notie8scripturlgoeshere");

if need target ie8 leave "notie8scripturlgoeshere" value empty: ""

javascript html internet-explorer-8

No comments:

Post a Comment