简单的问题:
$.each()
例如,当我想设置html()
为自己的属性时,如何在不使用的情况下引用 self ?
$('*[rel]').html($(this).attr('rel')); // nope
$('*[rel]').html($(self).attr('rel')); // nah
$('*[rel]').html($(sender).attr('rel')); // undefined
$('*[rel]').html($(target).attr('rel')); // still undefined
$('*[rel]').html($(???).attr('rel')); // this isn't even correct syntax
$('*[rel]').html($(beer).attr('rel')); // well that would be tasty
$('*[rel]').html($(woman).attr('rel')); // not in this life
$('*[rel]').html($(god help me!).attr('rel')); // He probably doesn't even know how to use a computer
$('*[rel]').html($(i give up).attr('rel')); // unexpected... o'rly?