switch.v1
switch has been updated for safety and mootools 1.2
what it is?
A 241 byte, “remixed for mootools” version of the Switchy McLayout technique by Marc van den Dobbelsteen.
what it do?
In the spirit of unobtrusive javascript; the only thing switch does is add a class to the body element. switch is, by default, triggered on both the domready and resize events.
The class name options are: xx-small / x-small / small / medium / large / x-large / xx-large. So you can easily style any element at any window size using something like: .xx-small #header{background:none}.
And that’s all there is to it. The level of complexity you add or remove from the different sizes is completely up to you.
where it at?
- full source 1.6kb
- compressed 559b (241b with server-side gzipping)