example12_funcystyle_intro - introducing "FuncyStyle" for creating css stylesheets in javascript



show FuncyTag html string output

show FuncyStyle css string output

show Javascript source code

To Notice: FuncyStyle is being used to create a ".box" class style so that every instance of box can now look something like:
 <div class="box" id="...
instead of the previous
 <div style="border-style:solid;width:80px;height:80px;text-align:center;float:left;padding:0.3em;cursor:pointer;" id="...
because this call to funcyStyle()
 funcyStyle( '.box',
             { borderStyle:'solid',
               width_px:boxSize,
               height_px:boxSize,
               textAlign:'center',
               float:'left',
               padding_em: 0.3,
               cursor: 'pointer' } );
has added this CSS to the stylesheet section of the page
 .box {
   border-style:solid;
   width:80px;
   height:80px;
   text-align:center;
   float:left;
   padding:0.3em;
   cursor:pointer;
 }

next: example13_animate_inout top: all js examples