Everybody, I try to make a responsive website so I've added media queries So it's like:
@media (min-width: 838px) {
bigscreen code
}
@media (max-width: 837px) {
littlescreen code
}
But when I do some things with JS like
if($(document).width()<837+1){
code
}
I've made a console.log($(document).width()). And the css littlescreen code happened when $(document).width() = 820 but I don't know why. If someone know, thanks you
EDIT: $(window).width() = $(document).width() = $('body').innerWidth() = $(window).innerWidth() = $(document).innerWidth()
820less than837?? - Pointy