I want to click a button which is on webpage opened in iframe based on class selector from my parent page.
I tried this:
$.each($('.classname'), function(i, el){
setTimeout(function(){
$(el).trigger('click');
},30000 + ( i * 30000 ));
});
but no success. How can i achieve this?
If the src of the iframe is pointing to a different domain, due to security reasons, you will not be able to access the contents of the iframe in javascript.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With