I am confused on the differences between these two code blocks:
$("#someButton").click(function() {
var button = this;
$(button).attr('disabled', 'disabled');
}
$("#someButton").click(function() {
var button = $(this);
$(button).attr('disabled', 'disabled');
}
Notice the difference of what the button variable stores. What's the point of storing $(this) into the button variable instead of just this? In the end, I am still using $(button).jQueryMethod() to manipulate it, not button.jQueryMethod().