Top "Dom" questions

The Document Object Model(DOM) is a way to programmatically refer to the elements of a markup language like XML and HTML.

How to check null objects in jQuery

I'm using jQuery and I want to check the existence of an element in my page. I have written following …

javascript jquery dom object null
Find an element in DOM based on an attribute value

Can you please tell me if there is any DOM API which search for an element with given attribute name …

javascript dom
For loop for HTMLCollection elements

I'm trying to set get id of all elements in an HTMLCollectionOf. I wrote the following code: var list = document.…

javascript dom
How can I scale the content of an iframe?

How can I scale the content of an iframe (in my example it is an HTML page, and is not …

html css dom
Converting HTML string into DOM elements?

Is there a way to convert HTML like: <div> <a href="#"></a> <span&…

javascript html dom
How to get `DOM Element` in Angular 2?

I have a component that has a <p> element. It's (click) event will change it into a <…

angular dom
Detect click outside React component

I'm looking for a way to detect if a click event happened outside of a component, as described in this …

javascript dom reactjs
Retrieving the text of the selected <option> in <select> element

In the following: <select id="test"> <option value="1">Test One</option> <option value="2"&…

javascript html dom
What is the most efficient way to create HTML elements using jQuery?

Recently I've been doing a lot of modal window pop-ups and what not, for which I used jQuery. The method …

javascript jquery html dom
JavaScript DOM remove element

I'm trying to test if a DOM element exists, and if it does exist delete it, and if it doesn't …

javascript dom