@@ -68,25 +68,16 @@ $.mobile.addResolutionBreakpoints = function( newbps ) {
68
68
detectResolutionBreakpoints ( ) ;
69
69
} ;
70
70
71
- /* on mobileinit, add classes to HTML element
72
- and set handlers to update those on orientationchange and resize
73
- */
74
- $ ( document ) . bind ( "mobileinit.htmlclass" , function ( ) {
75
- // bind to orientationchange and resize
76
- // to add classes to HTML element for min/max breakpoints and orientation
77
-
78
- var ev = $ . support . orientation ;
71
+ /* add classes to HTML element and set handlers to update those on orientationchange and resize */
72
+ $window . bind ( "orientationchange.htmlclass throttledresize.htmlclass" , function ( event ) {
79
73
80
- $window . bind ( "orientationchange.htmlclass throttledresize.htmlclass" , function ( event ) {
81
-
82
- // add orientation class to HTML element on flip/resize.
83
- if ( event . orientation ) {
84
- $html . removeClass ( "portrait landscape" ) . addClass ( event . orientation ) ;
85
- }
74
+ // add orientation class to HTML element on flip/resize.
75
+ if ( event . orientation ) {
76
+ $html . removeClass ( "portrait landscape" ) . addClass ( event . orientation ) ;
77
+ }
86
78
87
- // add classes to HTML element for min/max breakpoints
88
- detectResolutionBreakpoints ( ) ;
89
- } ) ;
79
+ // add classes to HTML element for min/max breakpoints
80
+ detectResolutionBreakpoints ( ) ;
90
81
} ) ;
91
82
92
83
/* Manually trigger an orientationchange event when the dom ready event fires.
0 commit comments