In many tutorials, I’ve noticed the code
this was referring to a DOM object, instead of the the entity. Adding the code
var self = this; and using
self helped me overcome this problem.
Can you explain what is happening in the background - what is
this and what is
var self = this; meant to avoid?
Thank you! Always grateful for this supportive community.