$ is not defined in js code example

Example 1: $ is not defined

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>

Example 2: $ is not defined

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>

Example 3: not defined javascript

/* Means something was not defined for example you wanted to print */ "X"
/* but X is not defined to defined you have to make a variable for it */
X = "Something" /* Once you define it it'll print the value successfully */

Tags:

Html Example