156 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 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
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+4 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
  • Has been part of the Envato Community for over 6 years
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 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