Changeset 12893

Show
Ignore:
Timestamp:
03/04/08 21:06:16 (9 months ago)
Author:
dante
Message:

refs #5962 - show query().style() example in dojo.style() and document common pitfall.
!strict

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dojo/trunk/_base/html.js

    r12827 r12893  
    427427                //      |               "border": "3px solid black", 
    428428                //      |               "height": 300 
     429                //      |       }); 
     430                //      example: 
     431                //              style properties in JavaScript are mixed-cased when the CSS equilivant is hypenated. 
     432                //              font-size becomes fontSize, and so on. 
     433                //      |       dojo.style("thinger",{ 
     434                //      |               fontSize:"14pt", 
     435                //      |               letterSpacing:"1.2em" 
     436                //      |       }); 
     437                //      example: 
     438                //              dojo.NodeList implements .style() using the same syntax, omitting the "node" parameter, calling 
     439                //              dojo.style() on every element of the list. See: dojo.query and dojo.NodeList 
     440                //      |       dojo.query(".someClassName").style("visibility","hidden"); 
     441                //      |       // or 
     442                //      |       dojo.query("#baz > div").style({ 
     443                //      |               opacity:0.75, 
     444                //      |               fontSize:"13pt" 
    429445                //      |       }); 
    430446                var n=dojo.byId(node), args=arguments.length, op=(style=="opacity");