$ (window). Bind ("Orientationchange", function (event) {if (event.orientation) {//PORTR AIT Vertical screen Landscape horizontal screen if (event.orientation = = ' Portrait ') {if (browser.ver sions.android) {//Android phone trigger time is late, set a delay setTimeout (function () { The element that needs to be changed is long-width $ ("#contents"). CSS ("height", parseint (window). Height ( )-44); $ ("#joinclub"). CSS ("width", $ (window). width ()); }, 300); } else {$ ("#contents"). CSS ("height", parseint (window). Height ()-44)) ; $ ("#joinclub"). CSS ("width", $ (window). width ()); }} else if (event.orientation = = ' Landscape ') {if (browser. Versions.android) { SetTimeout (function () {$ ("#contents"). CSS ("height", parseint ($ (window). Height ()-44)); $ ("#joinclub"). CSS ("width", $ (window). width ()); }, 300); } else {$ ("#contents"). CSS ("height", parseint (window). Height ()-44)) ; $ ("#joinclub"). CSS ("width", $ (window). width ()); } } } });
Web App page rotation overall style issue