mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-03 20:34:42 +00:00
should have been minwidth prefixes, and now adding all that apply, rather than just the greatest.
This commit is contained in:
parent
a5b4fdbaaa
commit
e0f9c24b94
1 changed files with 6 additions and 5 deletions
|
|
@ -402,17 +402,18 @@
|
|||
//add breakpoint classes for faux media-q support
|
||||
function resolutionBreakpoints(){
|
||||
var currWidth = $window.width(),
|
||||
classPrefix = "maxwidth-",
|
||||
breakPoint;
|
||||
minPrefix = "minwidth-",
|
||||
minBreakpoints = [];
|
||||
|
||||
$html.removeClass( classPrefix + $.mobile.resolutionBreakpoints.join(" " + classPrefix) );
|
||||
$html.removeClass( minPrefix + $.mobile.resolutionBreakpoints.join(" " + minPrefix) );
|
||||
|
||||
$.each($.mobile.resolutionBreakpoints,function( i ){
|
||||
if( currWidth >= $.mobile.resolutionBreakpoints[ i ] ){
|
||||
breakPoint = $.mobile.resolutionBreakpoints[ i ];
|
||||
minBreakpoints.push( $.mobile.resolutionBreakpoints[ i ] );
|
||||
}
|
||||
});
|
||||
|
||||
$html.addClass(classPrefix+breakPoint);
|
||||
$html.addClass( minPrefix + minBreakpoints.join(" " + minPrefix) );
|
||||
};
|
||||
|
||||
//common breakpoints, overrideable, changeable
|
||||
|
|
|
|||
Loading…
Reference in a new issue