I try to create a single page application via jquery.
The problem is that the click function is not called in the second part.
It can be solved by inserting the click function into the other, but I would need an infinite number of functions to navigate the page.
I have read that the function is exited with a return statement, but then the click function should be callable. That's not the case.
$(document).ready(function() {
$("#content").load("start.html", function() {
console.log("start was loaded!");
return;
});
$("#projects").click(function() {
console.log("#projects has been clicked!");
$("#content").load("projects.html", function() {
return;
});
return;
});
});