views:

44

answers:

2

At the moment, I have jQuery and jQueryUI installed like this:

js/jQuery/
js/jQueryUI/

I'm getting an error that seems to be related to loading CSS files. Is there a 'proper' way to include jQueryUI - should it be a subfolder of jQuery, for example?

+2  A: 

I typically just put all js files in a folder like "js" or "Scripts" and css files in a "CSS" folder. as long as you reference them from your HTML, it doesn't matter where they are.

however, I believe jQueryUI looks for images in a subfolder of where the CSS file is.

dave thieben
This is correct. I usually do a find/replace on my jqueryUI css file to point to where the image files are, because I don't like having an image folder inside my css folder.
Stephen
Do the js scripts make any reference to the paths to the CSS (relative or absolute)? Or is it down to me to ensure the css files are loaded?
Leo
not that I know of. try using Firebug in Firefox (on the "Net" tab) to see if any of your files are returning 404's
dave thieben
that's why I'm here (the 404), but I can't see which file it refers to.
Leo
I think it might be jQuery/themes/base/ui.base.css, but that file exists in that location. It's difficult to say with certainty because its a CMS that wraps the 404 in comfortable clothing.
Leo
The scripts do not care where your images are. They only add and remove classes.
Stephen
A: 

I copied the jQueryUI file into the same location as the jQuery file -

jQuery/jquery-1.4.2.min.js
jQuery/jquery-ui-1.8.5.custom.min.js

and it works without errors.

I don't explicitly load anything from the jQueryUI location, and I will eventually test remove the folder.

I'm surprised that this isn't documented and that nobody suggested it.

Leo