3 ms·
Well if they come from a web design background they know the css selectors which work with jquery. Unlike your example, which doesn't work as written.
by kisstheblade 10y ago
Well if they come from a web design background they know the css selectors which work with jquery.
Unlike your example, which doesn't work as written.
- wanda 10y agoProbably doesn't work because document.getElementById doesn't work with a CSS #id selector as a parameter, it needs the bare id, so it isn't finding the increment or output elements.
- LukasSkywalker 10y agoYou can always use document.querySelector() to target elements using a css selector
- the_duke 10y agoWhoops yeah, I just pasted from their jQuery code and forgot to remove the #. Remove them and it works: https://jsfiddle.net/wqxxufkv/ https://jsfiddle.net/wqxxufkv/ But as Skywalker mentioned, node.querySelector() / querySelectorAll has been working well across browsers for a while and supports most expressions jQuery selectors would.