Adobe 38040334 - Dreamweaver CS3 User Manual page 351

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Description
Gets a list of all the class styles in the active document. Without arguments it just returns class selector names. If the
argument is
bGetIDs
true
, it returns the full selector name.
true
For example, given an HTML file with the following code:
<style>
.test{ background:none };
p.foo{ background:none };
#bar {background:none };
div#hello p.world {background:none};
The calls in the following table return the values in the Result column.
Function call
dw.cssStylePalette.getStyles()
dw.cssStylePalette.getStyles(true)
dw.cssStylePalette.getStyles(false, true)
dw.cssStylePalette.getStyles(true, true)
Arguments
{bGetIDs, bGetFullSelector}
• The
argument is optional. It is a Boolean value that, if
bGetIDs
names (the part after the "#"). Defaults to
• The
bGetFullSelector
string, instead of just the names. Defaults to
Returns
An array of strings that represent the names of all the class styles in the document.
Example
If the Styles panel is set up as shown in the following figure, a call to the
function returns an array that contains these strings:
Palette.getStyles()
,
, and
"doctitle"
"heading"
, it returns just ID selector names. In either case, if the
.
false
argument is optional. It is a Boolean value that, if
.
false
:
"highlight"
Result
foo,test,world
bar,hello
p.foo,.test,div#hello p.world
#bar,div#hello p.world
, causes the function to return just ID selector
true
true
dreamweaver.cssStyle-
"BreadcrumbEnd"
DREAMWEAVER CS3
argument is
bGetFullSelector
, returns the complete selector
,
"change"
346
API Reference
,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents