I have an element that already has a class:  <div class="someclass">     <img ... id="image1" name="image1" /> </div>   Now I want to create a JavaScript function that will add a class to the div (not repla...
Imagine:  <div id="old-parent">     <span>Foo</span>     <b>Bar</b>     Hello World </div> <div id="new-parent"></div>   What JavaScript can be written to move all the child nodes (both...
I have a bookmarklet which inserts a CSS stylesheet into the target DOM via a "link" tag (external stylesheet).  Recently, this stopped working on Amazon.com, in Internet Explorer only.  It works on other sites, and with other browsers (even...
I am trying to use document.evaluate() to extract certain child elements out of a <svg> element. But I have problems by just extracting the <svg> itself. I can extract everything up to the <svg>, but no further. For example this wor...
I know that doing multiple dom manipulations is bad as it forces multiple repaints.  I.e:  $('body').append('<div />')          .append('<div />')          .append('<div />')          .append('<...
I am curious if anyone knows which of these is more efficient, I am only concerned with Firefox as a browser and do not need to know that this code doesn't work in IE, etc...  Basically I am showing and hiding DOM elements based on an input field...
Are there any techniques I can use to find what javascript is altering an HTML element? I am having some trouble finding how a particular element is getting an inline style of display:none added on load. I know I will find the script that does this e...
AFAIK mutation observers are not available yet in IE. Chrome, Safari, Firefox have their implementations and its working its way through the standardization process. I'm wondering if anyone (preferably MS employee) knows the story with IE, or mig...
I am looking for a recommendation on the best way to organised my code. I have a lot of jQuery   event handle which are used for:   dropdown menus, tabs etc  form validation  $.ajax get requests for dynamic form <options>'s  $.ajax post req...
I've recently been learning React Native but haven't really found a way to manipulate the DOM.   I've been trying to make it so that if I click on the TouchableHighlight my Image moves down a couple of px, but I have not managed to get it...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.