Reputation: 6294
What does this do?
<script>window.jQuery || document.write("<script src='js/libs/jquery-1.6.2.min.js'>\x3C/script>")</script>
Upvotes: 0
Views: 889
Reputation: 82584
This includes jQuery if it is not already defined.
if (typeof window.jQuery === 'undefined') {
document.write("<script src='js/libs/jquery-1.6.2.min.js'>\x3C/script>");
}
Is basically the same thing
Upvotes: 2
Reputation: 218722
If jQuery is not already loaded to your page and Load it from the location mentioned.
Upvotes: 1
Reputation: 7128
IF jQuery isn't called in recently page, it's calling jQuery with adding this line to page :
<script src='js/libs/jquery-1.6.2.min.js'>\x3C/script>
Upvotes: 0