inc: A super-tiny client-side include JavaScript jQuery plugin

Edit
although you can always use pure jQuery to do a client side include of html snippet in to another html by

  1. $(document).ready(function(){
  2. // find element with ID of "target" and put file contents into it
  3. $('#target').load('examples/jquery/load/my-include-file.inc');
  4. });

There is this little jQuery plugin that could make the job clear.
inc: A super-tiny client-side include JavaScript jQuery plugin

after loading that plugin, the code could become something like

12<p class="inc:footer.html">This text will be replaced
    with footer.html </p>


inc: A super-tiny client-side include JavaScript jQuery plugin inc: A super-tiny client-side include JavaScript jQuery plugin Reviewed by DF on 12:57:00 AM Rating: 5

Post Comments

©DF. Powered by Blogger.