Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

include jquery if not included

<!--
	Checks to see if jquery is defined
	If jQuery is NOT detected, include the script.
-->
<script type="text/javascript">
    if(typeof jQuery == 'undefined'){
        var foo = document.createElement("script");
        foo.type = "text/javascript";
        foo.src = "https://code.jquery.com/jquery-1.12.4.min.js"; // add path to jQuery script here
        document.head.insertBefore(foo, document.head.getElementsByTagName("script")[0])
    }
</script>
 
PREVIOUS NEXT
Tagged: #include #jquery #included
ADD COMMENT
Topic
Name
1+9 =