mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-28 07:34:00 +00:00
first media query break point class addition test
This commit is contained in:
parent
8724132d16
commit
e5f9028ea7
1 changed files with 12 additions and 3 deletions
|
|
@ -3,12 +3,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function( $ ) {
|
(function( $ ) {
|
||||||
var css_fn = $.fn.css;
|
var cssFn = $.fn.css,
|
||||||
|
widthFn = $.fn.width;
|
||||||
|
|
||||||
// make sure the original definition is replaced
|
// make sure original definitions are reset
|
||||||
module('mobile.media', {
|
module('mobile.media', {
|
||||||
teardown: function(){
|
teardown: function(){
|
||||||
$.fn.css = css_fn;
|
$.fn.css = cssFn;
|
||||||
|
$.fn.width = widthFn;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -33,4 +35,11 @@
|
||||||
$.fn.css = function(){ return "not absolute"; };
|
$.fn.css = function(){ return "not absolute"; };
|
||||||
same($.mobile.media('screen 3'), true);
|
same($.mobile.media('screen 3'), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test( "adding breakpoints adds the appropriate width classes", function(){
|
||||||
|
$.fn.width = function(){ return 120; };
|
||||||
|
|
||||||
|
$.mobile.addResolutionBreakpoints(125);
|
||||||
|
ok($('html').hasClass('max-width-125px'));
|
||||||
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
Loading…
Reference in a new issue