¿Cuál es la diferencia entre $(this)
y this
en jQuery? Aquí están dos diferentes usos:
$(document).ready(function() {
$("#orderedlist").find("li").each(function(i) {
$(this).append(" BAM! " + i);
});
});
$(document).ready(function() {
// use this to reset several forms at once
$("#reset").click(function() {
$("form").each(function() {
this.reset();
});
});
});
"' this' _by sí mismo es una referencia al objeto DOM que el evento está actuando upon_", hasta ahora la más bella definición para conocer 'esto', Colega de los pulgares:)! – Irfan