What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-03-13 00:40:15
dom create element
let myElm = document.createElement("p"); // Create a new element myElm.innerText = 'test'; // Change the text of the element myElm.style.color = 'red'; // Change the text color of the element document.body.appendChild(myElm); // Add the obje... Add solution -
CSS 2022-03-01 10:05:01
css how to remember psudoelements vs pesudo classes
/* Pseudo classes: • Selects actual elements (e.g. p or div) • Based on some condition that is probably not part of the HTML DOM • e.g if the user is hovering over it (:hover) • But sometimes it is stuff that woul... Add solution -
Javascript 2022-02-27 10:25:05
react ref
const FancyButton = React.forwardRef((props, ref) => ( <button ref={ref} className="FancyButton"> {props.children} </button> )); // You can now get a ref directly to the DOM button: const ref = React.createRef(); <Fanc... Add solution -
Other 2022-02-18 05:55:16
what is staleelementexception
There are two reasons for Stale element reference: The element has been deleted entirely. The element is no longer attached to the DOM. We face this stale element reference exception when the element we are interacting is destroyed and then recreated ag... Add solution -
SQL 2022-02-15 23:55:05
sql get list of domains and the tables that use them
--Queries an sde-schema geodatabase in SQL Server DECLARE @DOMAIN_NAME NVARCHAR(MAX); SET @DOMAIN_NAME = 'Material'; DECLARE @CLASS_DEFS TABLE ( Name nvarchar(max), Definition XML ) --Insert records to temporary record set INSERT INTO @CLASS_... Add solution -
CSS 2022-02-05 15:55:02
css before
The ::before and ::after pseudo-elements in CSS allows you to insert content onto a page without it needing to be in the HTML. While the end result is not actually in the DOM, it appears on the page as if it is, and would essentially be like this: div::b... Add solution -
Javascript 2022-02-03 10:20:19
jquery page finished loading
jQuery offers several ways to attach a function that will run when the DOM is ready. All of the following syntaxes are equivalent: $( handler ) $( document ).ready( handler ) $( "document" ).ready( handler ) $( "img" ).ready( handler ... Add solution