Ir para conteúdo
Fórum Script Brasil

Trudelmer

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Tudo que Trudelmer postou

  1. Estou com um problema, imagine o seguinte: index.php_______________________________________________________________________ <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="funcoes.js"></script> </head> <body> <a href="#" onclick="ajax('modal.php','conteudo')">Opcao de janela</a><br> <div id="conteudo"></div> </body> _______________________________________________________________________________ >>>> O arquivo funcoes.js contem uma função chamada "ajax" que carrega o coteudo do arquivo modal.php no div conteudo ((( ATÉ AQUI TUDO FUNCIONANDO ))) modal.php________________________________________________________________________ <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { $('a[name=modal]').click(function(e) { e.preventDefault(); var id = $(this).attr('href'); var maskHeight = $(document).height(); var maskWidth = $(window).width(); $('#mask').css({'width':maskWidth,'height':maskHeight}); $('#mask').fadeIn(1000); $('#mask').fadeTo("slow",0.8); //Get the window height and width var winH = $(window).height(); var winW = $(window).width(); $(id).css('top', winH/2-$(id).height()/2); $(id).css('left', winW/2-$(id).width()/2); $(id).fadeIn(2000); }); $('.window .close').click(function (e) { e.preventDefault(); $('#mask').hide(); $('.window').hide(); }); $('#mask').click(function () { $(this).hide(); $('.window').hide(); }); }); </script> <style type="text/css"> #mask { position:absolute; left:0; top:0; z-index:9000; background-color:#000; display:none; } #boxes .window { position:absolute; left:0; top:0; width:440px; height:200px; display:none; z-index:9999; padding:20px; } #boxes #dialog2 { background:url(notice.png) no-repeat 0 0 transparent; width:326px; height:229px; padding:50px 0 20px 25px; } .close{display:block; text-align:right;} </style> <a href="#dialog2" name="modal">Janela Modal 1</a> <div id="boxes"> <div id="dialog2" class="window"> teste </div> <div id="mask"></div> </div> _______________________________________________________________________________ >>>> O arquivo jquery.js é a versão 1.3.2 Quando você acessa o index.php e clica no link o arquivo modal.php é carregado, porem clicando no link do modal.php o jquery não é executado. Se você acessar direto o arquivo modal.php sem passar pelo index ele funciona perfeitamente. Veja exemplo em http://www.assitecno.com.br/teste/ Veja somente o modal.php em http://www.assitecno.com.br/teste/modal.php Baixe todos os arquivos em http://www.assitecno.com.br/teste/teste.7z Quando chamo o jquery dentro do meu div criado por ajax ele não junciona. alguém aqui sabe como resolver? alguém já passou por isso? Se alguém souber da uma força aí por favor.
×
×
  • Criar Novo...