Download the latest version of Glow and extract the contents into a folder.
u you downloaded.
The code given below explains how you can assign CSS to a div by two methods. The first div gets its CSS as soon as the document completes loading, however the second div gets the CSS assigned only when you click over it. That means the second way is a very good example of event association in glow. It is fairly simple and the methodology is similar to JQuery.
In the above code, glow.dom.get is used to get the reference of the div who has the class .eg_main_div. Notice the “.” with the string passed in the glow.dom.get, it acts like a selector. If you want to get a reference of an element with its name then you can simply pass its name. For instance if you want to get reference of all the divs on a page, then use glow.dom.get(“div”). “.css” assigns CSS to the referencing element.
Hope you create some good stuff with Glow Library. We will be back with more examples on widgets you can create with Glow. So do not miss the updates, subscribe to RSS
Stay Digified !!