Jump to content

help required


narjis

Recommended Posts

Hi,

I'm trying to load my linked pages to href in the container div and here is the code.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Prac
</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" >
$("#navigation a").click(function(){
var page = $(this).attr('href');
$("#container").load(page);	
return false;

});

</script>
</head>

<body>
<div  id="navigation">
<a href="home.html" onclick="return false;" >Home</a><br />
    <a href="about.html" onclick="return false;">About</a><br />
    <a href="contact.html" onclick="return false;">Contact</a><br />
</div>
<div id="container" style="width: 500px; height: 300px; background-color:#FF9;"></div>
</body>
</html>

It is not working properly. Please Help.

Link to comment
https://forums.phpfreaks.com/topic/252866-help-required/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.