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 do I check if an element is hidden in jQuery?

Is it possible to toggle the visibility of an element, using the functions .hide(), .show() or .toggle()? How would you …

javascript jquery dom visibility
How can I change an element's class with JavaScript?

How can I change the class of an HTML element in response to an onclick or any other events using …

javascript html dom
How do I get the value of text input field using JavaScript?

I am working on a search with JavaScript. I would use a form, but it messes up something else on …

javascript dom html-input
How to make JavaScript execute after page load?

I'm executing an external script, using a <script> inside <head>. Now since the script executes before …

javascript html dom dom-events pageload
How can I select an element by name with jQuery?

Have a table column I'm trying to expand and hide: jQuery seems to hide the td elements when I select …

javascript jquery html dom jquery-selectors
Remove element by id

When removing an element with standard JavaScript, you must go to its parent first: var element = document.getElementById("element-id"); element.…

javascript dom
Include another HTML file in a HTML file

I have 2 HTML files, suppose a.html and b.html. In a.html I want to include b.html. In …

javascript html dom include
Retrieve the position (X,Y) of an HTML element relative to the browser window

I want to know how to get the X and Y position of HTML elements such as img and div …

javascript html css dom position
How do I set/unset a cookie with jQuery?

How do I set and unset a cookie using jQuery, for example create a cookie named test and set the …

javascript jquery dom cookies
How do I programmatically set the value of a select box element using JavaScript?

I have the following HTML <select> element: <select id="leaveCode" name="leaveCode"> <option value="10">…

javascript html dom