$(document).ready(function() {
function GetDeals() {
alert($(this).attr("id"));
}
$('.filterResult').live("click", function(event) {
GetDeals();
});
});
What do I need to pass as argument in function GetDeals() so that I can manipulate with $(this)?
Thanks in advance!
You could just use the function as your event handle:
(please note, you don’t use the
()to call the function, so the function itself is being passed to thelive()function, not its result.Or you can use
Function.prototype.apply()