Gadgets and Dashboards 2.0 : Theming your Gadget Dynamically
This page last changed on Sep 14, 2009 by tmoore.
This page is part of the Gadget Developers' JavaScript Cookbook. How do I dynamically theme my gadget?It is possible to have the theme dynamically adapt to the space available with some JavaScript like this: action: ... theme : function () { if (gadgets.window.getViewportDimensions().width < 500){ return "top-label"; } else{ return "long-label"; } }(), fields: ... RELATED TOPICSGadget Developers' JavaScript Cookbook |
![]() |
Document generated by Confluence on Nov 22, 2009 17:46 |