css - jQuery Mobile Orientation Change Solutions -


i'm developing jquery mobile app. there's ton of dynamically generated css , far i've been developing portrait orientation. obvious problem when tilt device looks bad. don't need have landscape view app i'm not opposed either. can suggest easiest solution options being either landscape view or somehow locking app in portrait mode?

there 2 way check orientation.. firstly 1)

$(window).bind("orientationchange", function(evt){                    alert(evt.orientation); /*do want.*/                    }); 

secondly using css can check using min-width .i using ipad check 768 , 1024 .do things

@media screen , (min-width: 768px){     #realtimecontents {    overflow-y:auto;   -webkit-overflow-scrolling: touch;   position: relative;   height:850px   } } @media screen , (min-width: 1024px){     #realtimecontents {    overflow-y:auto;   -webkit-overflow-scrolling: touch;   position: relative;   height:600px   } } 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -