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...
How can I find DIV with certain text? For example:  <div> SomeText, text continues. </div>   Trying to use something like this:  var text = document.querySelector('div[SomeText*]').innerTEXT; alert(text);   But ofcourse it will...
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...
Let's presume you got a list with nested child lists.  <ul>     <li></li>     <li>         <ul>             <li></li>             <li></li>         </ul>     </li>     <li>&l...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.