I have an some html elements defined with class="tab".
And in my jquery file, I have defined the following function:
$('.tab').mouseleave( function() {
alert($(this).name);
});
When I trigger the mouseleave, for the element of class "tab", with the name "Contact", I do get the alert - but it says "undefined". I was expecting to see "Contact".
What does $(this) give me - does it actually give me the DOM element?
NB. Ultimately, I want to be able to work out on what side ( north, south, east or west ) the mouse left the element. So I'm doing this alert thing to ensure that I actually have access to the width and height of that element. So far, I don't seem to have access to that info.