So, I am new here and have a few questions about using the "this" keyword in Javascript. I am new to javascript but have much experience with C++. First question, is the "this" keyword just like using self? Secondly, if it is like self, and I use it in say a mouseover function, would the object using the mouseover function be like/self? Whenever I use this I am getting issues.
To give an overview, I have a box that I am resizing using CSS transitions and javascript. For this to work I have to change the width of many objects. I could go and make a function for each and every object, but that is not efficient. I would like a universal change width statement. But, whenever I use "this" and do the mouseover it just crashes and says "this" is a DOMWindow. I have included my function code because I cannot figure out why it is doing this, unless I am doing it wrong. Any help would be greatly appreciated.
function mouseOut(event)
{
this.width = "100px";
}
function mouseOver(event)
{
this.width = "200px";
}