Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>syntactically, it may be nicer to use jQuery to do it, but its probably more efficient to use</p> <pre><code> document.createElement('li') </code></pre> <p>And eliminate the need for at the bare minimum a string comparison test and a minor token parse. </p> <p><a href="http://flydom.socianet.com/" rel="noreferrer">flydom</a> may also tickle your interest if you insist on generating a lot of dom nodes. ( It should be faster in theory, but have not tested it )</p> <hr> <p>Note: Internally, jQuery("&lt;html>&lt;/html>") looks like it effectively does this(oversimplified):</p> <pre><code>jQuery(matcher) --&gt; function(matcher) { return jQuery.fn.init(matcher) --&gt; function(matcher) { return this.setArray( jQuery.makeArray( jQuery.clean(matcher) --&gt; function(matcher) { div = document.createElement('div'); div.innerHTML = matcher; return div.childNodes; } ) ); } } </code></pre> <p>So one would presume "<code>document.createElement</code>" is thus a "requirement", and if you <em>know</em> what you want out ( ie: not parising some 3rd party data with <code>$( datahere )</code> ) then <code>document.createElement</code> would imho be just as logical and with a speed boost to avoid the numerous regexps and slow string manipulations. </p> <p>By comparison: <code>jQuery(document.createElement('div'))</code> looks like it effectively does this(oversimplified):</p> <pre><code>jQuery(matcher) --&gt; function(matcher) { return jQuery.fn.init(matcher) --&gt; function(matcher) { this[0] = matcher; this.length = 1; return this; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload