Last active
August 29, 2015 14:01
-
-
Save ubergoober/64ed2803d7438c19d0d0 to your computer and use it in GitHub Desktop.
Check if jQuery is loaded from a browser console
This file contains 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
// Credits to : http://blog.smalldo.gs/2011/09/jquery-load-check/ | |
// check if jquery is loaded from a browser console | |
if (jQuery) | |
console.dir("jQuery "+$().jquery +" loaded"); | |
else | |
console.dir("jQuery NOT loaded"); | |
if($.ui) | |
console.dir("jQuery UI "+$.ui.version+" loaded"); | |
else | |
console.dir("jQuery UI NOT loaded"); | |
// Or | |
(jQuery) ? console.dir("jQuery "+$().jquery +" loaded") : console.dir("jQuery NOT loaded"); | |
($.ui) ? console.dir("jQuery UI "+$.ui.version+" loaded") : console.dir("jQuery UI NOT loaded"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment