How to detect with javascript or jquery when user turns iPad from vertical position to horizontal or from horizontal to vertical?
You can do that with cmd+k when you have your code selected.
If you have an iPhone or iPad with Face ID, swipe down from the top-left corner of the screen. If your iPhone or iPad has a Home button, swipe up from the bottom of the screen. Tap the Rotation Lock button to activate the lock. When active, the Screen Rotation lock icon will be red on a white background.
Try
$(window).bind('orientationchange', function(event) { alert('new orientation:' + event.orientation); });
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