Created
January 18, 2014 13:12
-
-
Save 0xDing/8490331 to your computer and use it in GitHub Desktop.
让seajs根据浏览器版本加载适合的jquery库,等效于<!--[if lt IE 9]><script src="jquery-1.9.0.js"></script> <![endif]--><!--[if gte IE 9]><!--><script src="jquery-2.0.0.js"><</script> <!--<![endif]-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var h5 = -[1,]; //判断是否为现代浏览器 | |
seajs.config({ | |
alias: { | |
'jquery': 'libs/jquery'+(h5 ? '2.0.3' : '1.10.2')+'/jquery' | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment