I was wondering if someone would be able to help or point me in a direction. I am looking to make a web application like a quiz. What I need is to be able to load dynamic content off a dynamical created button or href in this case that will link to the other content. So far it doesnt seem to be functioning in that i get a page not found every time i click the button. doesnt seem to be passing the .php through the name. I have tested this outside of the dynmaic content div and it works fine but i really need it to work inside. What I have so far:
index.php
<body>
<div class="container_12">
<div id="content">
<!--dynamic content loads here-->
</div>
</div>
</body>
Login.php
<h1> Login Page </h1>
<p> this is a test to c if works </p>
<a href='Suitable'>Hello</a> <!--button that doesnt work-->
general.js
$(document).ready(function() {
//initial
$('#content').load('Login.php');
//Handle widget Clicks
$('div#content a').click(function() {
var page = $(this).attr('href');
$('#content').load('pages/' + page +'.php');
return false;
});
});
Suitable.php
<h1> Working </h1>
<!-- content thats not loading off button-->