Skip to main content

Home/ InfokeyDEV/ Group items tagged dom

Rss Feed Group items tagged

Benx Shen

John Resig - DOM DocumentFragments - 0 views

  • Browser Normal (ms) Fragment (ms) Firefox 3.0.1 90 47 Safari 3.1.2 156 44 Opera 9.51 208 95 IE 6 401 140 IE 7 230 61 IE 8b1 120 40
  • As it turns out: A method that is largely ignored in modern web development can provide some serious (2-3x) performance improvements to your DOM manipulation.
Benx Shen

gotAPI/JavaScript DOM - Instant search in JavaScript DOM and other developer documentation - 1 views

Benx Shen

Groovy - Groovy Categories - 0 views

  • import groovy.xml.* def html = DOMBuilder.newInstance().html { head { title (class:'mytitle', 'Test') } body { p (class:'mystyle', 'This is a test.') } } use (groovy.xml.dom.DOMCategory.class) { assert html.head.title.text() == 'Test' assert html.body.p.text() == 'This is a test.' assert html.find{ it.tagName == 'body' }.tagName == 'body' assert html.getElementsByTagName('*').grep{ it.'@class' }.size() == 2 }
    • Benx Shen
       
      這裡是一個範例,可以看到透過 DOMCategory 的協助,xml dom 元素的存取直接可以用 "expression" 的方式就可以很方便地取用,而不需要很囉唆地 getElement() 或之類的
Benx Shen

jQuery Plugin - FlyDOM: Create DOM on the Fly - 0 views

  • FlyDOM aims to be an easy-to-use plugin for jQuery that makes generating dynamic content quick and easy.
1 - 5 of 5
Showing 20 items per page