Is there any way to select/manipulate CSS pseudo-elements such as ::before and ::after (and the old version with one semi-colon) using jQuery?  For example, my stylesheet has the following rule:  .span::after{ content:'foo' }   How can I ch...
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...
I'm building React components. I have added CSS inline in the components as suggested in this brilliant presentation by one of the guys behind React. I've been trying all night to find a way to add CSS pseudo classes inline, like on the sli...
How can I have the time variable's contents displayed as the content property in my CSS?  JavaScript:  function clock(){     var d = new Date();     var hour = d.getHours();     var min = d.getMinutes();     var time = hour + ":" + min; }...
Considering the following JavaScript, CSS, and HTML codes:    console.log(getComputedStyle(document.querySelector('p'), '::after').getPropertyValue('content')); p::after {     content: "Hello" attr(data-after); } <p...
I want to make rate stars progress bar with single div element and css pseudo elements like ::before.  Only thing what I can't do is manipulating width of ::before element with Javascript.  Here is my example:    .review-rate { 	background-image:...
I have this CSS to define drop areas, where a user can either drop a section before or after existing sections.  .section:before, .section:after {     content: "[insert here]";     height: 64px;     line-height: 56px;     width: 100%;     dis...
Is there a way to determine that given HTML element has pseudo element (::before / ::after) applied to it without calling  window.getComputedStyle(element, ":before/:after");   EDITED: the answer is NO  The problem with getComputedStyle is in...
I have an anchor link on a menu with an icon above it.  I need it so that when someone clicks on either the menu item, or the pseudo element above it holding the icon, the link works.  I have a codepen here: http://codepen.io/emilychews/pen/wJrqaR  T...
I am trying to toggle the display of an :after pseudo-element (ie.to show/hide it) using jQuery. I successfully toggled the display of a div, but want to do this now with :after.  The :after is being used to create the arrow on the box.  My attempt c...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.