I have a Html page, inside that page there is a iframe. In the Iframe src page I have written code to detect orientation and do some things. The orientation change is detected when I launch the iframe URL separately in browser, but when I use iframe, the orientation change is not detected. Do I need to use any plug in for this?
This will work only if your iframe is on the same domain, and if they fire 'orientationchange' event.
$(document).add(parent.document).on('orientationchange',function() {
// your logic
});
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