I went through this post. Detect Click into Iframe using JavaScript
But still, I see people have done similar stuff. Please tell me how do I do this.
One dev
Check out Jquery's .live method.
It can attach an event handler to a selector now and in the future, such as when content is loaded into a div.
http://api.jquery.com/live/