I just had an odd question and was wondering if this is something I’m missing, or it’s something that just differs per host.
I’ve started going through more learning in jquery, and one thing that I notice many people do is that they include the .js file, and then instead of putting the code right on the page, they include it as another .js file.
So here’s the question: when I include a file like ‘slide.js’, it works perfectly on my localhost, but I can’t seem to get my actual hosting provider to get it to work. When I upload the files, and then test it, nothing happens. It’s only when I put the code right on the page (like the first jquery script) does it work.
Why does it work on my localhost and not on a provider hosted server?
You have to make sure your path is right – and you have actually uploaded your JS file too :) things like that. Lots of reasons why, but my first thought would be file path – do you have a live link? Oh and check you uploaded the jQuery file too :)
False alarm I guess… I seriously spent like 20 minutes yesterday messing with it and I re-uploaded the example I’m working with and it’s working fine. Must have been one of those instances where it’s just some dumb simple thing and you just are totally missing it :)