开发者

jquery doesn't work after upload

I designed a website on my Computer with XAMP, but as I uploaded it to my Host all the Javascript and Jquery just stopped working.

the only Error I get back looks like this

$("#link1").FontEffect is not a function 

All the required .js files are imported. And my script looks like this:

<script src="./script/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="./script/menu.js" type="text/javascript"> </script>
<script src="./script/shadow.js" type="text/javascript" ></script>    
 <script ty开发者_如何学运维pe="text/javascript" src="./script/jquery-FontEffect-1.0.0.min.js"></script> 
 <script type="text/javascript">                                         
$(document).ready(function() {
   $("#wrapper").boxshadow(20,20,100,'#30302F');
   $("#link1").FontEffect({outline:true, shadow:true ,shadowColor:'#414345' ,outlineColor1:'#A06BB5', outlineWeight:2, shadowBlur:2})
   $("#link2").FontEffect({outline:true, shadow:true ,shadowColor:'#414345' ,outlineColor1:'#26A31A', outlineWeight:2, shadowBlur:2})
   $("#link3").FontEffect({outline:true, shadow:true ,shadowColor:'#414345' ,outlineColor1:'#E81515', outlineWeight:2, shadowBlur:2})
   $("#link4").FontEffect({outline:true, shadow:true ,shadowColor:'#414345' ,outlineColor1:'#DB641A', outlineWeight:2, shadowBlur:2})
   $("#link5").FontEffect({outline:true, shadow:true ,shadowColor:'#414345' ,outlineColor1:'#4D5154', outlineWeight:2, shadowBlur:2})
   $("#kwicks").kwicks({
  max:205,  
  min:25,  
  spacing:1
  });
   $(function () {
  $("#navi > li a").hover( function () { $(this).stop().animate({paddingLeft : '25px'}, 500);
  }, function () {$(this).animate({paddingLeft : '10px'}, 400);});
 });
 });
   </script>

Thannks for your help!


have you checked case sensitivity in your path to the js files?


Make sure the file is called jquery-FontEffect-1.0.0.min.js and not jquery-fonteffect-1.0.0.min.js or jquery-FONTEFFECT-1.0.0.min.js. Case does matter in Unix servers.


are you correctly linking to jquery and any plugins?

your html source is equally as important.

and that error suggests it can't find the right file from my experience


FontEffect is a jQuery plugin. Test in order:

  • All the libraries are correctly linked
  • You load jQuery and then FontEffect


Can it be possible that paths to jQuery and other Js files are incorrect?

Can I suggest you trying "http://url/script/jqueryxys.js" from the browser?


Use the FF extension firebug, load the site and navigate to the network tab. You should see all requests and there should be four requests for including the js files. Check if they are red. If they are, the server can't find the files located at that address, meaning the paths are wrong.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜