Basically, I have noticed that the jQuery UI library makes calls to images using url("images/abc.png") etc and so when using this library in my web app, I am getting alot of images, that are not found, which also seems to stall some 开发者_如何学Goof my pages.
Anyway, based on this, am I suppose to create a images directory to cater for these URL image calls and place all these images used throughout the jQuery UI library in this directory or does jQuery do something in the backend?
What is the correct way of using such libraries and ensuring that all required resources are found?
Is there any documentation that explains how this works?
The images for jQuery UI are included in the download, just unzip it all and use the images folder that's included beside the .css
you're already including.
Alternatively, if you're using one of the default themes you can include the CSS from the Google CDN and it'll pull the images from there. Here's the jQuery UI 1.8.4 blog post that has a link to each theme's CSS: http://blog.jqueryui.com/2010/08/jquery-ui-1-8-4/
For an earlier version just replace the version in the url, for example:
- 1.8.4: http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css
- 1.8.2: http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/base/jquery-ui.css
- Latest 1.8: http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css
- 1.7.2: http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css
You get the idea, just put the appropriate version in :)
精彩评论