O'Reilly logo

Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites by Gigi Sayfan, Kevin Dangoor, Mark Ramm

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 14.5.2. Working with Style

As you sit at your computer, wearing a tuxedo (or evening gown, as the case may be), sipping a martini, you may think to yourself, “Now I’m working with style.” However, because this is a programming book, this section is not about fashion. It’s about manipulating the styles that are applied to the objects in your web pages.

The most basic bit of style that you can apply to a DOM element is whether that element is visible. No need to worry about fonts if the user can’t even see the element, right?

There are times when you need to hide an element and display it again when the user performs some action. This is common in web applications, and it’s easy to do with MochiKit. hideElement(e1[, e2, ...]) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required