I have a case like this –
$('<first-selector>').each(function(){
$(this).click(function(){
$('<second-selector>').click(function(){
/* Here I want to use the top $(this) reference to do some business.
I don't want to use like var thisObj = $(this) and refer it inside
the click function*/
});
});
});
How to use $(this) reference inside another object?
Use $.proxy
Demo: http://jsfiddle.net/TRw4X/