There is no CSS equivalent to jQuery insertAfter, insertBefore, etc. So how would you achieve all that
That is not what I meant with:
What I mean is handling the logic in the mediaqueries in one place. And for me that place would be CSS.
.removeAttr("style"). When this would be done with adding, removing and/or toggling classes, then those classes could be targeted and styled within the CSS mediaqueries: in my opinion it’s easier that way to see what’s going on. That will also make it easier to progressively enhance the layout.
Anyway there is a
$(window).width() doesn’t take the vertical scrollbar into account or something (so this also may vary in different browsers).