jQuery AJAX
http://ruseller.com/...p?rub=28&id=569 и в общем вот такая проблемма: скрипт работает только в одну сторону, т. е. если переходить со сраницы А на страницу Б, то всё работает, но обратно, со страницы Б на страницу А действует как обычный линк. Или со сраницы Б на страницу А, всё работает, а обратно, со страницы А на страницу Б, та же фигня.
Код страницы А:
<head>
<meta http-equiv="Content-Language" content="en-us">
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="Happy template" />
<meta name="keywords" content="happy, template" />
<meta name="author" content="Luka Cvrk (www.solucija.com)" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/nav.js"></script>
<script type="text/javascript">
$(function(){
AjaxContent.init({containerDiv:"#ajax-wrap",contentDiv:"#text"}).ajaxify_links("#menu a");
});
</script>
<style type="text/css">
html {height:100%;}
body {height:100%; margin:0; padding:0;}
#bkg {position:fixed; bottom:0; left:0; width:100%; height:100%;}
#menu {position:relative; z-index:1;}
</style>
<!--[if lte IE 6]>
<style type="text/css">
html {overflow-y:hidden;}
body {overflow-y:auto;}
#bkg {position:absolute; z-index:-1;}
#menu {position:static;}
</style>
<![endif]-->
</head>
<body bgcolor="#ffffff">
<div id="bkg">
<img src="images/bkg_site.jpg" width="100%">
</div>
<div id="ajax-wrap">
<div id="text">
<div align="center" id="menu" style="position: absolute; left:0%; width:100%; height:17px; top:47%;">
<a href="main.htm"><img border="0" src="images/menu/about.png" width="50" height="17"></a>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="menu.htm"><img border="0" src="images/menu/news.png" width="41" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/music.png" width="47" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/photo.png" width="48" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/video.png" width="46" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/our_team.png" width="78" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/partners.png" width="77" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/contact.png" width="77" height="17"></a>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15016663-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
<head>
<meta http-equiv="Content-Language" content="en-us">
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="Happy template" />
<meta name="keywords" content="happy, template" />
<meta name="author" content="Luka Cvrk (www.solucija.com)" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/nav.js"></script>
<script type="text/javascript">
$(function(){
AjaxContent.init({containerDiv:"#ajax-wrap",contentDiv:"#text"}).ajaxify_links("#menu a");
});
</script>
<style type="text/css">
html {height:100%;}
body {height:100%; margin:0; padding:0;}
#bkg {position:fixed; bottom:0; left:0; width:100%; height:100%;}
#menu {position:relative; z-index:1;}
</style>
<!--[if lte IE 6]>
<style type="text/css">
html {overflow-y:hidden;}
body {overflow-y:auto;}
#bkg {position:absolute; z-index:-1;}
#menu {position:static;}
</style>
<![endif]-->
</head>
<body bgcolor="#ffffff">
<div id="bkg">
<img src="images/bkg_site.jpg" width="100%">
</div>
<div id="ajax-wrap">
<div id="text">
<div align="center" id="menu" style="position: absolute; left:2%; width:96%; height:65%; top:18%;">
<div align="center" id="content" style="position: absolute; left:0%; width:100%; height:95%; top:0%; background-image:url('images/bkg_page.png')">
</div>
<div align="center" id="link_to_back" style="position: absolute; left:1%; width:98%; height:4%; top:96%;">
<a href="menu.htm">
<img border="0" src="images/back_to_menu.png" width="83" height="8" align="left"></a>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15016663-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
Установил вот этот скрипт:
Код страницы А:
Цитата:
<head>
<meta http-equiv="Content-Language" content="en-us">
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="Happy template" />
<meta name="keywords" content="happy, template" />
<meta name="author" content="Luka Cvrk (www.solucija.com)" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/nav.js"></script>
<script type="text/javascript">
$(function(){
AjaxContent.init({containerDiv:"#ajax-wrap",contentDiv:"#text"}).ajaxify_links("#menu a");
});
</script>
<style type="text/css">
html {height:100%;}
body {height:100%; margin:0; padding:0;}
#bkg {position:fixed; bottom:0; left:0; width:100%; height:100%;}
#menu {position:relative; z-index:1;}
</style>
<!--[if lte IE 6]>
<style type="text/css">
html {overflow-y:hidden;}
body {overflow-y:auto;}
#bkg {position:absolute; z-index:-1;}
#menu {position:static;}
</style>
<![endif]-->
</head>
<body bgcolor="#ffffff">
<div id="bkg">
<img src="images/bkg_site.jpg" width="100%">
</div>
<div id="ajax-wrap">
<div id="text">
<div align="center" id="menu" style="position: absolute; left:0%; width:100%; height:17px; top:47%;">
<a href="main.htm"><img border="0" src="images/menu/about.png" width="50" height="17"></a>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="menu.htm"><img border="0" src="images/menu/news.png" width="41" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/music.png" width="47" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/photo.png" width="48" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/video.png" width="46" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/our_team.png" width="78" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/partners.png" width="77" height="17"></a></td>
<img border="0" src="images/menu/slash.png" width="19" height="17"></td>
<a href="main.htm"><img border="0" src="images/menu/contact.png" width="77" height="17"></a>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15016663-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
Код страницы Б:
Цитата:
<head>
<meta http-equiv="Content-Language" content="en-us">
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="description" content="Happy template" />
<meta name="keywords" content="happy, template" />
<meta name="author" content="Luka Cvrk (www.solucija.com)" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/nav.js"></script>
<script type="text/javascript">
$(function(){
AjaxContent.init({containerDiv:"#ajax-wrap",contentDiv:"#text"}).ajaxify_links("#menu a");
});
</script>
<style type="text/css">
html {height:100%;}
body {height:100%; margin:0; padding:0;}
#bkg {position:fixed; bottom:0; left:0; width:100%; height:100%;}
#menu {position:relative; z-index:1;}
</style>
<!--[if lte IE 6]>
<style type="text/css">
html {overflow-y:hidden;}
body {overflow-y:auto;}
#bkg {position:absolute; z-index:-1;}
#menu {position:static;}
</style>
<![endif]-->
</head>
<body bgcolor="#ffffff">
<div id="bkg">
<img src="images/bkg_site.jpg" width="100%">
</div>
<div id="ajax-wrap">
<div id="text">
<div align="center" id="menu" style="position: absolute; left:2%; width:96%; height:65%; top:18%;">
<div align="center" id="content" style="position: absolute; left:0%; width:100%; height:95%; top:0%; background-image:url('images/bkg_page.png')">
</div>
<div align="center" id="link_to_back" style="position: absolute; left:1%; width:98%; height:4%; top:96%;">
<a href="menu.htm">
<img border="0" src="images/back_to_menu.png" width="83" height="8" align="left"></a>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15016663-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
Подскажите, где ошибка...