Skip to content

Instantly share code, notes, and snippets.

@kimhogeling
Last active January 14, 2016 09:20
Show Gist options
  • Save kimhogeling/04d06f0d642d77f2e3a0 to your computer and use it in GitHub Desktop.
Save kimhogeling/04d06f0d642d77f2e3a0 to your computer and use it in GitHub Desktop.
min/max width of product boxes shopping24
// 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