Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/08/2010, 10:04
MadDunDee
 
Fecha de Ingreso: octubre-2006
Mensajes: 199
Antigüedad: 17 años, 6 meses
Puntos: 3
Respuesta: Callback jQuery, sintaxis

Eso es justo lo que necesito, pero lamentablemente debo de estar haciendo algo mal. Lo he pasado de la siguiente manera:

Código PHP:
function myFunction(id) {
    $(
'.hover-fx-fade'+id).hover(function() {  
          
        
width = $('.hover-fx-fade').width() * zoom;  
        
height = $('.hover-fx-fade').height() * zoom;  
          
        $(
this).find('img').stop(false,true).animate({'width':width'height':height'top':move'left':move}, {duration:200});  
          
        $(
this).find('div.fx-fade').stop(false,true).fadeIn(200);  
    },  
    function() {  
        $(
this).find('img').stop(false,true).animate({'width':$('.fx-fade').width(), 'height':$('.fx-fade').height(), 'top':'0''left':'0'}, {duration:100});      
  
        $(
this).find('div.fx-fade').stop(false,true).fadeOut(400);  
    }); 
  } 
Y el callback en quicksand lo realizo con la llamada a esta función:

Código PHP:
$('#list-works').quicksand($filteredData, {
        
duration300,
        
easing'easeInOutQuad',
        
useScalingtrue,
        
adjustHeighttrue,
        
timezone: +10,
        }, 
myFunction('id')  // callback function 

      
); 
Hay algo q no entiendo y es el tema del id, q supongo q simplemente es el nombre que quiero utilizar para esta función. Pero no entiendo por qué se usa el más y luego el identificador. No se supone que pasandole el nombre de la función simplemente debería de lanzarla?

Siento tantas dudas, pero sobre todo agradezco el interés y la ayuda!! Muchas gracias en cualquier caso!!