First of all I want everyone to know that I am absolute beginner so please be patient with me.
I want to know how am I going to put the entire html page in a div. I t
replace
$("#directors").html("directors.html");
with
$("#directors").load("directors.html");
the html file that you load should only contain the contents of the DIV - ie not the <head>
the <body>
or even the navigation - just the content
using your code you fill the html code with a constant string "footballplayer.html".
You can use the load method, here is an example:
$('#footballPlayers').load('footballplayers.html');
it get via AJAX the page you request and fill the element.
I'm on the load
train:
$("#div1").load("myhtmlpage.htm");
You can use load
for this:
$("#div1").load("myhtmlpage.htm");
You need to actually load the contents of footballplayers.html
using AJAX, and then put that in the div.
Try this:
$("#footballPlayers").load("footballplayers.html");
.load
uses AJAX to get the page, then loads it into the div.
use load
jQuery("#footballPlayers").load("footballplayers.html");
for more details click here