Last active
January 14, 2016 09:20
-
-
Save kimhogeling/04d06f0d642d77f2e3a0 to your computer and use it in GitHub Desktop.
min/max width of product boxes shopping24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code zum Messen, einfach in die Console ausführen und Fenster groß/klein ziehen | |
var min = 9999, max = 1, product = $('.product'); | |
window.onresize = function () { | |
var w = product.getBoundingClientRect().width; | |
if (w < min) { | |
min = w; | |
} | |
if (w > max) { | |
max = w; | |
} | |
} | |
/*************** | |
* Ergebnisse: * | |
***************/ | |
// ab 320px (iPhone 1 bis 5 landscape) | |
// bis 768px (iPads landscape) | |
iOS = { | |
min: 157, | |
max: 291.5 | |
} | |
// ab 769px (Desktop) | |
desktop = { | |
min: 192.1875, | |
max: 293.328125 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment