Got a js that appends an iframe with content from other site. I need certain action to be triggered on click within the iframe.
Obviously, i can't use elements inside iframe. I've tried following, and it didn't work.
$('.container iframe').click(function(){
alert('works!");
});
Then I tried this.
$('.container').click(function(){
alert('works!");
});
click on container works, but when click happens within iframe, it doesn't work.
Can someone point me in right direction? Thank you!