FAQ Database Discussion Community

Array.prototype.splice.call - not working with a querySelectorAll('.className')

I have three divs with a class name of .column , on the bottom, before my body tag I have a small script which is supposed to get these divs and put them into an array so that I can work on them. I've done this before so I don't...

for of loop querySelectorAll

Mozilla states that "for of loops will loop over NodeList objects correctly". (source: https://developer.mozilla.org/en-US/docs/Web/API/NodeList) However, this doesn't work in Chrome 43. Is this incorrect documentation or a browser bug? The copied example code used on a page with checkboxes: var list = document.querySelectorAll( 'input[type=checkbox]' ); for (var item of list)...

Invalid selector with querySelectorAll :not with descendants

I've got a case where I need to select different groups of nodes on a page, and I need to exclude certain child elements. My most common task is selecting all <img> elements, but not some that are descendants of certain elements. Take for example my fiddle here: http://jsfiddle.net/rjdbys13/ I...

How to select the