I’ve recently made my website responsive. I’ve gone with the one page idea.
and now I found that I want as much time on my site as possible, I want to try using 3rd party sites as little as possible so i have decided to post my “example snippets” on my own site, each has a page, and each of the pages has their own containing DIV with the ID of the title in the name so the CSS doesn’t get mixed up. which i found to be working. but keeping in mind that there are jQuery and JS scripts incorperated into these examples. and their all being dumped on one java script file, i found that only ONE of them work. I dont know why the other don’t work.
This reply has been reported for inappropriate content.
Without having looked at the problem yet. Why not embed the JS for each page in the HTML? External JS is good because it’s cached, re-used on different pages and all, but here the JS is small so you don’t really need caching and it’s nor re-used either since they are examples.
Speaking of caching, don’t use “. Link to the precise version you want to benefit from long term caching (assuming jQuery CDN works the same as Google’s).
EDIT: Anyway, you’re getting errors because in your JS you assume some elements exists, but they don’t exist on all pages.