Hello everybody,
I have a quick question that I'm sure some of you would have an answer for, let me explain.
I'm working on a very simple website, static content, pure HTML, and CSS, and some javascript to make everybody's life easier.
The site has a header, nav, side bar and footer and although the site is static, I thought I could use something like ".load()" to load the HTML files that would make for the nav bar, side bar and footer.
I'm using jQuery and I realized that the anchor tags in the files that I load don't behave the way I expect them to do.
As an example, I wanted to use "preventDefault()" to keep my links in check, and it only works with the anchor tags that are hard-coded into each HTML page, anchor tags that are part of the file that was loaded bypass the "preventDefault()" all together.
I don't have enough experience to figure out why, although after some research I realized that it has to do with the DOM and the elements that I'm adding to it.
I would appreciate any help.
Thanks