Adobe Dreamweaver API Reference CS5 Manuale Utente Pagina 346

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 533
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 345
341
DREAMWEAVER API REFERENCE
Page content
Last updated 8/27/2013
Example
[...]
var blocks = DOM.getBlockElements();
var dProps = null, children = null;
for (var i=0; i < blocks.length; i++){
// get the declared styles so we can see whether width
// or height have been specified explicitly
dProps = window.getDeclaredStyle(blocks[i]);
// if the block has children, border-left, and padding-bottom
// but no width or height
if (blocks[i].hasChildNodes() && |
issueUtils.hasBorder(blocks[i],null,"left") &&
(parseFloat(blocks[i].getComputedStyleProp("padding-bottom")) > 0) &&
typeof(dProps.width) == "undefined" && typeof(dProps.height) == "undefined"){
children = blocks[i].getBlockElements();
var hasLayout = false;
// loop through the block-level children to see if
// any have width or height defined. width or height on any
// of the children of the outer block will prevent the bug.
for (var j=0; j < children.length; j++){
dProps = window.getDeclaredStyle(children[j]);
if (typeof(dProps.width) != "undefined" || typeof(dProps.height) !=
"undefined"){
hasLayout = true;
break;
}
}
[...]
}
}
[...]
dom.getInlineElements() elem.getInlineElements()
Availability
Dreamweaver CS3.
Description
Scans the document (or element) for descendents with an inherent or specified display value of 'inline'.
Arguments
None.
Returns
An array of element nodes.
Vedere la pagina 345
1 2 ... 341 342 343 344 345 346 347 348 349 350 351 ... 532 533

Commenti su questo manuale

Nessun commento