Imported Jquery does not work

TerryB

New Member
I am learning javascript + jquery lately, encounter a problem when trying to import jquery into the html.I got the code below from internet, while I try to change the line from \[code\]<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script>\[/code\]to \[code\]<script type='text/javascript' src='http://stackoverflow.com/questions/12795778/jquery.js'></script>\[/code\]it does not work, the script does not execute.I am sure that the file "jquery.js" is same folder as the html file, and the jquery.js is downloaded from http://jquery.com/download/ (I did change the file name into 'jquery.js' rather than its orginal long name)What mistake I could possibly made?Html code:\[code\]<!DOCTYPE html><html><head><script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script><script> $(document).ready(function(){ $("button").click(function(){ $("div").animate({left:'250px'}); });});</script> </head><body><button>Start Animation</button><p>By default, all HTML elements have a static position, and cannot be moved. To manipulate the position, remember to first set the CSS position property of the element to relative, fixed, or absolute!</p><div style="background:#98bf21;height:100px;width:100px;position:absolute;"></div></body></html>\[/code\]
 
Back
Top