So I have SUPER basic block of code and it is not acting as I thought it should. I'm just about to start messing with .load and doing a bit of testing before i move into allowing a PHP script to fill in content, but it doesn't appear to be working. So here we go:
- <html>
- <head>
- nonsense
- </head>
- <body>
- some html
- </body
- </html>
The above should be loaded pretty easily by:
- $('#target').load('test.html');
However I was getting nothing. So I filled in #target with some jibberish and reloaded. Which the click event fires it actually clears the existing html and replaces it with nothing. At first I was thinking I just had the path to test.html wrong so i copied it to the js folder and the root. No difference. I even tried loading from my website's html since I KNOW there is html is there.
It should be noted that this is a little segment from a much larger chunk of code, so i know the jquery is linked properly and all the other functions are running correctly. So what am I missing?