Created
June 3, 2016 01:26
-
-
Save jbelke/61bd3a84c9ed2cc4e0d58569d56fdab1 to your computer and use it in GitHub Desktop.
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
<!-- TESTING DEV_CHECKLIST--> | |
<script> | |
//Will jQuery Be Found? | |
if (window.jQuery) { | |
// jQuery is loaded | |
document.write('jQuery is loaded'); | |
} else { | |
// jQuery is not loaded | |
document.write('jQuery is not loaded'); | |
} | |
if (window.$j) { | |
// jQuery is loaded | |
document.write('$j is loaded'); | |
} else { | |
// jQuery is not loaded | |
document.write('$J is not loaded'); | |
} | |
$j(document).ready(function(){ | |
$j("button.test").click(function(){ | |
$j("p.test").text("jQuery works!"); | |
}); | |
}); | |
</script> | |
<div style="border: 1px solid #999; border-radius: 5px; text-align: center; background:#efefef;"> | |
<p class="test">Check if jQuery is Working.</p> | |
<button class="test">Test jQuery</button> | |
</div> | |
<!-- TESTING --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good to check when using multiple libraries, ie. Prototype + jQuery