Zapatec.StyleSheet

Overview | File | Class | Tree | Index | Help

Zapatec Utils

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class Zapatec.StyleSheet

    Object
       |
       +--Zapatec.StyleSheet

class Zapatec.StyleSheet

Defined in stylesheet.js

Field Summary
`Object` | `styleSheet`

Constructor Summary
`Zapatec.StyleSheet(<boolean> bUseLast)` Zapatec StyleSheet class.

Method Summary
`Object` | `addParse(<string> strStyleSheet)` Parses a CSS string and adds rules into the style sheet.
`void` | `addRule(<string> strSelector, <string> strDeclarations)` Adds a rule to the style sheet.
`void` | `removeRules()` Removes all rules from the style sheet.

Field Detail

### styleSheet

    Object styleSheet

Constructor Detail

### Zapatec.StyleSheet

    Zapatec.StyleSheet(<boolean> bUseLast)

Zapatec StyleSheet class.

     Important: Try not to have more than 30 style tags on the page because
     http://support.microsoft.com/kb/262161

     When IE raises exception due to the limitation above, last style tag on the
     page is used instead of creating new one. In this case use of
     Zapatec.StyleSheet.removeRules() is not recommended.

Parameters:

`bUseLast` - Optional. If true, will try to find last style tag and use it. Will create new style tag only if there are no styles on the page

Method Detail

### addParse

    Object addParse(<string> strStyleSheet)

Parses a CSS string and adds rules into the style sheet.

Parameters:

`strStyleSheet` - CSS string

### addRule

    void addRule(<string> strSelector, <string> strDeclarations)

Adds a rule to the style sheet.

Parameters:

`strSelector` - Rule selector

`strDeclarations` - Rule declarations

### removeRules

    void removeRules()

Removes all rules from the style sheet.

Overview | File | Class | Tree | Index | Help

Zapatec Utils

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Thu Aug 16 12:18:39 2007