CoonnozyMof
New Member
I'm trying to come up with a purely front-end solution to a common practice.In the past, I've stored the HTML for reused website elements (like the \[code\]<nav>\[/code\], \[code\]<header>\[/code\], \[code\]<footer>\[/code\], etc.) in a \[code\]functions.php\[/code\] file, and used php functions to call these things in on multiple pages. This of course makes it easier to make changes site-wide, making my life easier.However, I don't really want to use PHP (or in the past, ASP) to do this anymore. Does any one know of a clean way to do this in Javascript, jQuery or even Node? To be clear I want to call a function in the HTML (like \[code\]writeNav();\[/code\] ) that pulls the HTML for the nav. I'd rather not include \[code\]<script>\[/code\] tags everywhere, if possible.