Nik's public fiddles
-
singleton example
No-Library (pure JS), HTML, CSS, JavaScript
-
nbut29vp
jQuery 1.8.3, HTML, CSS, JavaScript
-
856ma0a7
jQuery 1.8.3, HTML, CSS, JavaScript
-
image puzzle
jQuery Compat (edge), HTML, CSS, JavaScript
-
t1. grid
clearly float:left doesn't fit here - due to potentially different heights of the elements, so `display:inline-block` is a better solution.
-
t.2 delegation: jquery + clone
to clone a dom node is much faster indeed.
-
t.2 delegation: jquery + manual delegation and manual creation
Another solution - "MANUAL DELEGATION" good solution if you need to switch on/off events
-
t.2 delegation: jquery + manual creation
jquery delegation with on() and manual button creation.
-
t.2 delegation: addEventListener + createElement
Emulation of deprecated "live/delegate" function from jquery. You can use "delegate"-like function by narrowing down the object which you attach the event listener to some smaller obj #someID MASSIVELY SLOW http://jsperf.com/after-vs-insertafter due to createElement
-
t.2 delegation: addEventListener + cloneNode
cloneNode() makes DOM work faster. An added element is only one, so no need to use createDocumentFragment()