c'è qualche differenza tra i seguenti due metodi? è # 1 più veloce del # 2?
#1
$('#selector').on('click',function(){
$(this)...
// do stuff with clicked element
})
and
#2
$('#selector').on('click',function(e){
$(e.currentTarget)....
// do stuff with clicked element
})
Leggendo la documentazione (http://api.jquery.com/ event.currentTarget /) avrebbe dovuto darti la risposta. – j08691
Questa segnalazione di bug è rilevante: http://bugs.jquery.com/ticket/11756. Usiamo ufficialmente "questo" dal momento che assumono che sia ciò che sta facendo il 98%. – Medorator