I've downloaded a JQuery UI template and uploaded it to a server. It works locally but not on the server.
anyone know what I'm 开发者_开发技巧missing?
thanks
I really recommend you to let Google Libraries API to host both jQuery and jQuery UI for you. The biggest reason is that your clients will probably already have this script cached so they don't have to download it again, and by not hosting them yourself they won't use up any of your bandwidth. You can easily load the scripts from their CDN by using the following:
For jQuery:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery-ui.min.js"></script>
For jQuery UI:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/jquery-ui.min.js"></script>
If you want to use another version of the script, you just replace the version number in the url.
And if you're wondering why I left out the protocol scheme (http/https) in the url, it's because your browser will automatically add the correct scheme. Paul Irish have written an excellent article about this.
Get Firebug and check the Net Tab for any 404 errors - this will show you any missing files.
精彩评论