Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/02/2011, 08:08
baladier
 
Fecha de Ingreso: febrero-2010
Mensajes: 17
Antigüedad: 14 años, 2 meses
Puntos: 0
Jquery dos funciones a la vez

Tengo un inconveniente, estoy desarrollando una web, que debe actualizar un inbox cada x cantidad de segundos lo que hago con jquery (jquery.timers), del codigo que se genera hay un boton que al presionarlo, me debería mostrar un cuadro (jquery.fancybox). el problema que no me muestra el cuadro, ahora si elimino el timer si me muestra el cuadro. o funciona el timer o funciona el fancybox, pero no ambos.
Dejo el codigo para saber si hay algo incorrecto:

Código HTML:
$(document).ready(function(){
  var j = jQuery.noConflict();
  j(document).ready(function()
  {
  	j("#caja-scroll").everyTime(2000,function(i){
  		j.ajax({
  			url: "php/inbox.php", 
  			cache: false,
  			success: function(html){
  				j("#caja-scroll").html(html);
  			}
  		})
  	})
  }); 

jQuery(".btnGestionar").click( function(){
var currentId = $(this).attr('id');
$.ajax({
type: "GET",
url: "php/act_gestion.php?id="+currentId+"&accion=open",
success: function(datos){
if (datos == "ocupado"){
$('#btnPopAlerta').fancybox({'transitionIn' : 'elastic', 'transitionOut' :'elastic','onClosed': function(){ location.href='index.php?go=2';}}).trigger('click');
}else if (datos == "abierto"){
$('#btnGestionarH').fancybox({'transitionIn' : 'elastic', 'transitionOut' :'elastic','onClosed':function(){
																								$.ajax({
																								type: "GET",
																								url: "php/act_gestion.php?id="+currentId+"&accion=cerrar",
																								success: function(datos){
																								location.href='index.php?go=2';
																								}
																								});
																								}}).trigger('click');
}
}
});
});
});