I am using CSS media queries to deliver different views of my website. Basically just depending on the width i show/hide certain elements.
Now I also need to move stuff around depending on this width. That means a DOM element must move to a different place in the DOM tree.
Since it contains forms and other unique stuff, I can not just have it in the DOM tree twice and toggle visibility. I really need to move it around, preferably with jQuery.
I have already found this: http://css-tricks.com/media-query-change-detection-in-javascript-through-css-animations/ But is it really the only way?