Skip to content

Instantly share code, notes, and snippets.

@ubergoober
Last active August 29, 2015 14:01
Show Gist options
  • Save ubergoober/64ed2803d7438c19d0d0 to your computer and use it in GitHub Desktop.
Save ubergoober/64ed2803d7438c19d0d0 to your computer and use it in GitHub Desktop.
Check if jQuery is loaded from a browser console
// 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