イベントは、android 用の firefox モバイルでは機能しません。
結局、向きの変化をどのように検出するのですか?
イベントは、android 用の firefox モバイルでは機能しません。
結局、向きの変化をどのように検出するのですか?
Android 版 Firefox は orientationchange イベントをサポートしていませんが、メディア クエリ リスナーを使用して同じ結果を得ることができます。
var mqOrientation = window.matchMedia("(orientation: portrait)");
// The Listener will fire whenever this either matches or ceases to match
mqOrientation.addListener(function() { self.handleViewportChange(); });
これは、Android用のffの魅力のように機能します
$( window ).resize(function() {
alert($( window ).height());
});