How do I pass $(this) as a parameter in the setTimeout function (method?)?
Here’s what I’m doing so far, which is working:
var Variables = {};
Variables.ResizeTimer = false;
Variables.$obj = null;
$('.draggable').resize(function() {
if (Variables.ResizeTimer !== false) {
clearTimeout(Variables.ResizeTimer);
}
Variables.$obj = $(this);
Variables.ResizeTimer = setTimeout(mySizer,
1000
);
});
try this:
From MPD:
To elaborate on this, read up on Javascript closures