stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
10/30/13 09:23 PM (12 years ago)

where does jquery go

I'm writing an app for the first time using jquery in a html file . I've put the html file and the jquery-1.7.2.min.js files in the BT_Docs file, but the java script doesn't run when I get to the html page. I know the jquery is correctly coded since when I open the html in my browser it works as it should. What am I doing wrong? Also, while I'm at it, the html file has a div styled with a background image, a tif file. The image I put in the BT_Images folder, call it photo.tif. How do I reference it in the CSS so Xcode can find it? Thanks
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/30/13 10:27 PM (12 years ago)
CSS and HTML files will go in BT_Docs. You can put images in BT_Images, and just reference them as you normally would. Same in the CSS file. JS files go in BT_Docs as well, but you need to tell Xcode not to compile them. Here's an article that should help: http://iosdevelopertips.com/xcode/tell-xcode-not-to-compile-a-file.html Mark
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
10/31/13 07:06 AM (12 years ago)
Thanks Mark but the article you mentioned says to copy file from Compile Sources Folder to Copy Bundle Resources folder. Where are these folders. In Xcode all I see are the BT folders I've imported when I ran the compiled code. Where do I find these mentioned folders? Thanks. Steve
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
10/31/13 07:18 AM (12 years ago)
Thanks Mark but the article you mentioned says to copy file from Compile Sources Folder to Copy Bundle Resources folder. Where are these folders. In Xcode all I see are the BT folders I've imported when I ran the compiled code. Where do I find these mentioned folders? Thanks. Steve
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
10/31/13 07:50 AM (12 years ago)
Mark, Never mind, I was able to find it. Thanks again. Steve
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
10/31/13 12:44 PM (12 years ago)
Mark, Here is one of those weird things about what we just discussed. I read the article and moved my jquery file from Compile Sources to Copy Bundle Resources and as I said above it worked. Then later, I had other problems and decided to recompile and start again. However, the app and the javascript works no WITHOUT moving the jquery file. It's in Compile Sources and not in Copy Bundle Resources. Any idea why it should work this way now and it didn't before? Steve
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/31/13 11:13 PM (12 years ago)
Hi Steve, I'm not quite sure why it's working when it appears it shouldn't! Since you're likely using the same project files as you did the first time, it's possible there are some old build rules hanging around that are working in your favor. Or maybe it's some new feature of Xcode, if you happen to be running the latest version. I would expect you still need to remove the code from Compile Sources to Copy Bundle Resources, but I'm not sure how to address what you've seen! Mark
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.