I have trouble loding content ( what I am loading is a php file ) into a div. I am new in programming in general so I don t have a good command of most basic things.
I can load the content into a DIV when i use the same jquey ( or javascript ) code in a separate file but when I place it into the file I am interested, it won t work.
This is the link to the working document:
http://szler.com.ar/ejer/#content3
And this is the link to the file not loading it. and the one I am interested in making work ( the layout is different but I am using the same jquery file ). Here s the code:
$(function() {
$("#tabs a").click(function() {
var page = this.hash.substr(1);
<!--console.log(page);-->
$.get(page+" .php", function(gothtml) {
<!--console.log(gothtml);-->
$("#content").html(gothtml); });
return false;
});
});
And this is the html code of the one NOT working:
<!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>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/JavaScript" src="javascript/1.js"></script>
</head>
<body>
<div id="header">
<div id="header_content">
<ul class="tabs" >
<li class="li"><a href="#content1">Tab 3</a> </li> <!--li= list item -->
<li class="li"><a href="#content2">Tab 2</a> </li>
<li class="li"><a href="#content3">Tab 1</a> </li>
</ul>
</div>
</div>
<div id="cuerpo">
<div id="content"></div>
</div>
</body>
</html>
Why does it work in one file and not in the other one ??? I would appreciate any help.
Thanks a lot