$('#xxx').click(function () { var _this = $(this); $('#yyy').click(function () { console.log(_this); $.ajax({ // ... }) }); })