Re: [jQuery] Change all CSS background images url

2009-11-17 Thread Liam Byrne
Why are you using a root-relative URL ? If the entire site is in a folder, and then you move everything into another folder, everything will stay relative. Therefore, having the path as "img" (or whatever the relative path to that folder is) should work, no ? Liam nomen wrote: Hi all:

Re: [jQuery] Change all CSS background images url

2009-11-16 Thread Michel Belleville
First idea that comes to mind is to let your client define another site base, you then don't even have to change your css as the apparent site base would be the client's sub-directory. You do that using the tag as shown here : http://www.w3schools.com/TAGS/tag_base.asp Hope it helps. Michel Bell

Re: [jQuery] Change all CSS background images url

2009-11-16 Thread Liam Potter
it would be a bad idea to do this with javascript. I'd recommend simply using find and replace all in your css. find url(/img replace url(/subdir/img nomen wrote: Hi all: I have a website. All my images are in "/img" directory. Now, my client needs to put the site in a subdirectory, so

[jQuery] Change all CSS background images url

2009-11-16 Thread nomen
Hi all: I have a website. All my images are in "/img" directory. Now, my client needs to put the site in a subdirectory, so, my images are now in "/subdir/img". In the future, maybe we have to change the site to another subdirectory. I donĀ“t want to change all my CSS anytime the cl