Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <public:component lightWeight="true">
- <public:attach event="oncontentready" onevent="setWidth()" />
- <public:attach for="window" event="onresize" onevent="setWidth()" />
- <public:method name="setWidth" />
- <script>
- function setWidth(){
- var windowWidth = element.document.compatMode == 'CSS1Compat' ? element.document.documentElement.clientWidth : element.document.body.clientWidth;
- element.runtimeStyle.width = windowWidth < 750 ? 750 : 100+'%';
- }
- </script>
- </public:component>
Add Comment
Please, Sign In to add comment