Answer the question
In order to leave comments, you need to log in
Responsive layout with JavaScript. How it's done?
Hello. Faced such a task that there is an online store and a bunch of different blocks, important information, etc. ( colorkid.ru/stolberi/). The whole thing needs to be made adaptive. And I started having problems ...
When the screen is reduced, I transfer blocks along the tree through appendChild and then a complete kotovasiya occurs. Not only do the blocks that need to be transferred accumulate a bunch and they again need to be returned to their original position when the screen is expanded, but the function that does all this works every other time. Really! view function
function f(){....}
window.onload = function() {
window.onresize = f;
f()
}
Answer the question
In order to leave comments, you need to log in
Why are you carrying them all? Why for adaptive layout js? Yes, there are times when you need it. But the way you use it is not correct. Why is everything not done through css?
I will do it only through media queries , let it be easier , but more reliable
See articles on how to make all sorts of Bootsrap grids (not how to use, but how to implement).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question