jobo: this.key == undefined ?!

Beitrag lesen

Hallo,

$('.item').children().each(function(){$(this).mouseenter(function(){

$(this).append( this.option = $(option).clone());
$(this.option).hide().fadeIn('fast');
this.option.key = "test";

$(this.option).click(function(){

  console.log(this.key);  

});
});


>   

this.option.key oder this.key?  
  
Guck doch mal, was this ist. Vielleicht das Window-Objekt. Dann musst du u.u. this in einer Variable speichern. that = this zb..  
  
  
  
Gruß  
  
jobo