Skip to content

Instantly share code, notes, and snippets.

@ElmahdiMahmoud
Last active October 12, 2015 18:48
Show Gist options
  • Save ElmahdiMahmoud/4070851 to your computer and use it in GitHub Desktop.
Save ElmahdiMahmoud/4070851 to your computer and use it in GitHub Desktop.
jquery: undefind
if (typeof jQuery == 'undefined')
{
$("body").css('background','red'); // if jQuery is undefined so the let the background be ( RED! )
}
else
{
$("body").css('background','green'); // if jQuery is there so the let the background be ( Green! )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment