i have following problem: i am trying to load a different html file into a div in my index.html. well it works fine for some links, but for other links (those which get opened in the div) this is not the case. code follows:
first html
<!DOCTYPE html>
<html>
(...)
<body>
<div id="header">
<ul style="text-align: center; font-size: 16px; text-shadow: 1px 1px black; color: red;">
<li id="home"><a href="#" id="load_home"><p>HOME</p></a></li>
<li id="media"><p>MEDIA</p>
<ul>
<li><a href="#" id="load_test">media</a></li>
</ul>
</li>
</ul>
</div>
<div id="mainbox">
<!--CONTENT IS DISPLAYED HERE-->
</div>
</body>
</html>
then both sites which can be loaded atm:
<p style="color: azure; text-shadow: 1px 1px black;"><a href="#" id="load_home">load home</a></p>
<p style="color: azure; text-shadow: 1px 1px black;"><a href="#" id="load_test">load test</a></p>
and finaly my jquery:
$("#load_home").on("click", function(){
$("#mainbox").load("home.html");
});
$("#load_test").on("click", function(){
$("#mainbox").load("testcontent.html");
});
well to sum it up: i have a div box in my main file, which is empty and has the id "mainbox". this "mainbox" shouldn't stay empty. i want to fill it with content and all links outside "mainbox" can fill it up, but if i have a link inside my "mainbox" and i click on it, nothing happens. it can link to external sitest like google, but not to html files, which should "erase" mainbox' content and fill it with new...