156 posts
  • 7 Years of Membership
  • Affiliate Level 3
  • Author Level 5
  • Collector Level 3
+5 more
SachaG
says

While working on a html template, I wanted to include some global files like the header and footer to avoid duplicating the same code in all the files. But I wondered if there was a way to do this without having to resort to PHP . Although it’s a popular language, some buyers might want to use the files with ASP , Rails, or another server-side language.

It turns out it’s very easy to do with jQuery, so I wrote up a very short tutorial:

http://www.themedesigner.net/using-jquery-to-include-files/

Disclaimer: don’t use this technique if you think your buyers are going to use the files as they are, because if they use a client-side include on their live site, Google won’t be able to index it. But it’s still a useful trick for something like an admin interface template.

960 posts
  • Weekly Top Seller
  • Exclusive Author
  • Featured Item
  • Envato Tuts+ Instructor
+5 more
jeffeatworld
says

This is one way, but I’m pretty sure you can just use AJAX to include the file in the same way.

156 posts
  • 7 Years of Membership
  • Affiliate Level 3
  • Author Level 5
  • Collector Level 3
+5 more
SachaG
says

Using AJAX to include the file is already what I’m doing… I’m not sure what you mean?

by
by
by
by
by
by