* classNameやcssTextでstyleの操作を減らす [#tdfbf667]

 element.style.color = "red";
 element.style.fontSize = "25px";

 .active {
     color: red;
     fontsize: 25px;
 }
 
 element.className = "active";

 element.style.cssText = "color: red; fontSize: 25px;"

** 出典 [#u4a05a1b]

http://www.slideshare.net/nzakas/writing-efficient-javascript


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS