Is it possible to change a CSS pseudo-element style via JavaScript?  For example, I want to dynamically set the color of the scrollbar like so:  document.querySelector("#editor::-webkit-scrollbar-thumb:vertical").style.background = localSto...
From what I understand the HTML5 spec lets you use IDs that are numbers like this.  <div id="1"></div> <div id="2"></div>   I can access these fine using getElementById but not with querySelector.  If I try d...
I tried to use document.querySelectorAll(), but IE8 throw error, that      Object doesn't support this property or method   var titleCheckBox = document.querySelectorAll("");   Here http://www.quirksmode.org/dom/w3c_core.html#t13 writte...
I have some jquery-like function:  function(elem) {     return $('> someselector', elem); };   The question is how can i do the same with querySelector()?  The problem is > selector in querySelector() requires parent to be explicitly sp...
XPath can do everything querySelector can do, and more, so when would you ever choose the latter? I haven't seen any speed benchmarks comparing the two, so right now I'm choosing based on syntax conciseness, which seems kind of arbitrary.  Ed...
With the code from this article I've successfully added querySelectorAll to document in IE7.  But I need to use it on an element rather than document, like this:  var containers = document.querySelectorAll('.container');   // Works for (v...
I have selected a specific class via .querySelectorAll:  var hit3 = document.querySelectorAll(".lattern.hit-3 .circle");   I am now trying to target and adjust a .style.visibility attribut on this element, by doing the following:  hit3.style....
I have a <div> and a <video> that both have the same id:  <div id="id1">     Some content </div> <video id="id1">     <source></source> </video>   It is not possible for me to change the...
I have a requirement where I have to pickup the last .div within a container and apply some business logic to it. The selection of the last .div has to be dynamic because the user has the option to add/remove .div elements.  Initially I tried with qu...
I'm getting grey haired here because I can't get this clock to display on my SPA. I'm haveing a clock that should be displayed on the page but I can't seem to get it right. I have tried the things we were taught at the course but I ca...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.