What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-22 21:25:11
iterate over node object children
/* HTML */ /* <ul class="navigation__secondary" id="navigation-bar"> <li class="navigation__secondary-item"> <span>Item</span> </li> <li class="navigation__secondary-item active&... Add solution -
Javascript 2021-11-03 20:15:11
list listener on a page js
function listAllEventListeners() { const allElements = Array.prototype.slice.call(document.querySelectorAll('*')); allElements.push(document); allElements.push(window); const types = []; for (let ev in window) { if (/^on/.test(ev)) types[t... Add solution -
Other 2021-09-11 03:01:02
class="lazy"
/* lazyload.js (c) Lorenzo Giuliani * MIT License (http://www.opensource.org/licenses/mit-license.html) * * expects a list of: * `<img src="blank.gif" data-src="my_image.png" width="600" height="400" class=... Add solution -
Javascript 2021-08-31 21:11:03
javascript prototype vs constructor function
function Class () {} Class.prototype.calc = function (a, b) { return a + b; } // Create 2 instances: var ins1 = new Class(), ins2 = new Class(); // Test the calc method: console.log(ins1.calc(1,1), ins2.calc(1,1)); // -> 2, 2 // Change the p... Add solution
Best helpers
Czlsws
+5
Shahruz Raad
+5
Horse
+5
Csandreas1
+5
SOUMEN
+5
Vy32
+5
Anugram
+5
ImMathan
+5
Joyo
+5
Huggy Buggy
+5