Keeps JavaScript and CSS in sync using a unique approach that allows you to control styles for responsive design without doing user-agent detection.
Notice nothing changed? The site appears static, right? Go to Step 2.
The layout should have responded to the new browser width. (If not, try resizing some more.)
Notice the layout is still adapted to the same screen size as it was when the page was loaded.
It uses CSS media queries to assign the width of an invisble element (<script> by default) and then JavaScript reads the width of that element and applies the needed CSS class (more information on the technique).
Here is what class(es) we currently have on the page:
Check out the more dynamic demo
Check this page in different browsers/devices and see what you get (report a bug).
screen.width | window.outerWidth | CSS media query | JSS media query |
---|---|---|---|