开发者

JQueryUI not working [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜