estou usando a biblioteca jquery para fazer isso...
está tdo certo!
link que abre na div e o historico funciona...
o que quero é que um link dentro da div abra nela mesmo!
alguém pode me ajudar?
no firefox funciona mas no ie não!!!
obrigado
<script type="text/javascript">
// PageLoad function
// This function is called when:
// 1. after calling $.historyInit();
// 2. after calling $.historyLoad();
// 3. after pushing "Go Back" button of a browser
function pageload(hash) {
// hash doesn't contain the first # character.
if(hash) {
// restore ajax loaded state
$("#load").load(hash + ".php");
} else {
// start page
$("#load").empty();
}
}
$(document).ready(function(){
// Initialize history plugin.
// The callback is called at once by present location.hash.
$.historyInit(pageload);
// set onlick event for buttons
$("a[@rel='history']").click(function(){
//
var hash = this.href;
hash = hash.replace(/^.*#/, '');
// moves to a new page.
// pageload is called at once.
$.historyLoad(hash);
return false;
});
});
</script>
Pergunta
Raphael Fagundes
preciso de uma ajuda...
estou usando a biblioteca jquery para fazer isso...
está tdo certo!
link que abre na div e o historico funciona...
o que quero é que um link dentro da div abra nela mesmo!
alguém pode me ajudar?
no firefox funciona mas no ie não!!!
obrigado
<script type="text/javascript"> // PageLoad function // This function is called when: // 1. after calling $.historyInit(); // 2. after calling $.historyLoad(); // 3. after pushing "Go Back" button of a browser function pageload(hash) { // hash doesn't contain the first # character. if(hash) { // restore ajax loaded state $("#load").load(hash + ".php"); } else { // start page $("#load").empty(); } } $(document).ready(function(){ // Initialize history plugin. // The callback is called at once by present location.hash. $.historyInit(pageload); // set onlick event for buttons $("a[@rel='history']").click(function(){ // var hash = this.href; hash = hash.replace(/^.*#/, ''); // moves to a new page. // pageload is called at once. $.historyLoad(hash); return false; }); }); </script>Link para o comentário
Compartilhar em outros sites
1 resposta a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.