I'm trying to get a reference to cell and it appears null. If I'm understanding it correctly, I should be able to reference the variable. Correct?
$('td[someAttr]').mouseenter(function(cell) {
var timeoutId = setTimeout(function() {
// what should variable cell be?
}, 1000);
});
OR
$('td[someAttr]').mouseenter(function(cell) {
var timeoutId = setTimeout(function() {
// what should variable cell be?
}, 1000, cell);
});
UPDATE: This was obvious but the reason I asked this was because cell.pageX would be undefined if you had:
$('td[someAttr]').mouseenter(function() {
var cell = this; //
var timeoutId = setTimeout(function() {
alert(cell.pageX); // cell.pageX will return null
}, 1000);
});
However, if you had:
$('td[someAttr]').mouseenter(function(cell) {
alert(cell.pageX); // works fine as cell.pageX will have correct value.
});