Quando é com arquivos .html o script funciona mas quando uso show.php?id_show=41 o script não funciona.
alguém saber como resolver esse problema?
<html>
<head>
<meta http-equiv="Content-Type" conteudo="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var content = $('#content');
//pre carregando o gif
loading = new Image(); loading.src = 'ico-loading.gif';
$('#menu a').click(function( e ){
var arq = pega_arq( $( this ).attr('href') );
abre( arq, content );
});
/* iniciando com a home */
abre( pega_arq( document.location.href ), content );
});
function abre( href, content ){
content.html( '<img src="ico-loading.gif" />' );
$.ajax({
url: href,
success: function( response ){
content.delay(1000).hide().html( response ).fadeIn();
init_plugins( href );
}
});
}
function pega_arq( url ){
var file = url.split('#');
return ( file[1] ) ? file[1]+'.html' : 'home.html';
}
function init_plugins( href )
{
if( href=='lightbox.html' )
{
$('#gallery a').click(function( e ){
e.preventDefault();
})
$('#gallery').lightBox();
}
}
</script>
</head>
<body>
<ul id="menu">
<li><a href="contato.html">Home</a></li>
<li><a href="fotos.html">Fotos</a></li>
<li><a href="../show.php?id_show=41">Contato</a></li>
</ul><!-- /menu -->
<div id="conteudo">
<h1>Bem Vindo!</h1>
<p>Essa eh a home desse nome pseudo-site.</p>
</div><!-- /content -->
</body>
</html>