Display matching media query and browser width/height.
Display matching media query and browser width/height at the bottom of the viewport.
This commit is contained in:
3
scripts/jquery_min.js
vendored
Normal file
3
scripts/jquery_min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
17
scripts/skeletonMatchMedia.js
Normal file
17
scripts/skeletonMatchMedia.js
Normal file
@ -0,0 +1,17 @@
|
||||
$(function(){
|
||||
// Window load and resize.
|
||||
$(window).bind('load resize', function() {
|
||||
if(debug){
|
||||
if(window.matchMedia("(min-width: 768px) and (max-width: 959px)").matches){
|
||||
$('#debug').html("Tablet (Portrait)");
|
||||
} else if(window.matchMedia("(min-width: 480px) and (max-width: 767px)").matches){
|
||||
$('#debug').html("Mobile (Landscape)");
|
||||
} else if(window.matchMedia("(max-width: 767px)").matches){
|
||||
$('#debug').html("Mobile (Portrait)");
|
||||
} else{
|
||||
$('#debug').html("Desktop & Tablet (Landscape)");
|
||||
}
|
||||
$('#debug').append(" – ("+ $(window).width() + ' x '+ $(window).height() +')px');
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user