jQuery: this.attr() not a function? April 12, 2024 by Tarik Use: $(this).attr instead of this.attr This forces it into the context of jQuery.