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.

Get selected option text with JavaScript

I have a dropdown list like this: <select id="box1"> <option value="98">dog</option> &…

javascript html dom drop-down-menu
Check if an image is loaded (no errors) with jQuery

I'm using JavaScript with the jQuery library to manipulate image thumbnails contained in a unordered list. When the image is …

javascript jquery image dom jquery-events
Uncaught TypeError: Cannot read property 'top' of undefined

I apologize if this question has already been answered. I've tried searching for solutions but could not find any that …

javascript jquery html css dom
Force DOM redraw/refresh on Chrome/Mac

Every once in a while, Chrome will render perfectly valid HTML/CSS incorrectly or not at all. Digging in through …

javascript css macos dom google-chrome
Difference between innerText, innerHTML, and childNodes[].value?

What is the difference between innerHTML, innerText and childNodes[].value in JavaScript?

javascript dom
How can I check if a scrollbar is visible?

Is it possible to check the overflow:auto of a div? For example: HTML <div id="my_div" style="…

javascript css dom scrollbar
How to get the element clicked (for the whole document)?

I would like to get the current element (whatever element that is) in an HTML document that I clicked. I …

javascript jquery html dom
How may I sort a list alphabetically using jQuery?

I'm a bit out of my depth here and I'm hoping this is actually possible. I'd like to be able …

javascript jquery dom sorting
How to use XPath in Python?

What are the libraries that support XPath? Is there a full implementation? How is the library used? Where is its …

python xml dom xpath python-2.x
Get next / previous element using JavaScript?

How do I get the next element in HTML using JavaScript? Suppose I have three <div>s and …

javascript html dom