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...
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...
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...
How can I place many pseudo selectors inside the native Javascript querySelectorAll()?  Example: I want to search for an element with an id that starts with [id^=starting]  and ends with [id$=ending]. (Couldn't find existing question so making my...
I am using the modals found here on Codrops.  These modals have one close button (also closes when you click outside the modal), but I want to add more. The JavaScript is below:  var ModalEffects = (function() {      function init() {          var ov...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.