Skip to content

Instantly share code, notes, and snippets.

@jbelke
Created June 3, 2016 01:26
Show Gist options
  • Save jbelke/61bd3a84c9ed2cc4e0d58569d56fdab1 to your computer and use it in GitHub Desktop.
Save jbelke/61bd3a84c9ed2cc4e0d58569d56fdab1 to your computer and use it in GitHub Desktop.
<!-- 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 -->
@jbelke
Copy link
Author

jbelke commented Jun 3, 2016

Good to check when using multiple libraries, ie. Prototype + jQuery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment