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...
Where this is coming from  When I first learned jQuery, I normally attached events like this:  $('.my-widget a').click(function() {     $(this).toggleClass('active'); });   After learning more about selector speed and event delegati...
I'm trying to select this element which has square brackets in the name attribute:  <input type="text" name="inputName[]" value="someValue">   I've tried this (which doesn't work):  $('input[inputName[]...
All right, say I have this:  <select id='list'>     <option value='1'>Option A</option>     <option value='2'>Option B</option>     <option value='3'>Option C</option> </s...
Is this:  var contents = document.getElementById('contents');   The same as this:  var contents = $('#contents');   Given that jQuery is loaded?...
I have a load of divs with the class testimonial and I want to use jquery to loop through them to check for each div if a specific condition is true. If it is true, it should perform an action.  Does anyone know how I would do this?...
jQuery.unique lets you get unique elements of an array, but the docs say the function is mostly for internal use and only operates on DOM elements. Another SO response said the unique() function worked on numbers, but that this use case is not nece...
Which is better to use as a performance perspective:  $(".div1 h2, .div1 h3")   or  $(".div1").find("h2, h3")...
Is there a simple selector expression to not select elements with a specific class?  <div class="first-foo" /> <div class="first-moo" /> <div class="first-koo" /> <div class="first-bar second-foo"...
In psuedo code, this is what I want.  var selector = $(this).cssSelectorAsString(); // Made up method... // selector is now something like: "html>body>ul>li>img[3]" var element = $(selector);   The reason is that I need to pass...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.