Questions tagged as 'dom'

2
answers

Browsing entire DOM with jQuery

How do I go through the entire DOM and find a particular element in jQuery? I want, by clicking on li of classe="home" , open div of classe="submenu" . <body class="home"> <!-- Header --> <div class...
asked by 21.05.2014 / 20:54
1
answer

What's the difference between document.querySelector and getElementsByTagName?

I would like to know the differences in the use of these two commands, because for min that I am in the beginning of the study very similar and even equal in some moments, but having different nomenclatures one must have differences between the...
asked by 27.08.2018 / 16:19
1
answer

How and why getElementById does not execute on page load?

Business problem: I will create a system that will run on a serverless platform. It can be a local administration area interface (a client for a service), or a Mobile application. The application will dynamically load content for ease of maint...
asked by 02.03.2017 / 15:42
1
answer

How to get a value from a td from the column name

I would like to get the value of the td of a table by the name of the column. //index definido por numero $valor=$('.table td').eq(0).text(); alert("resultado com index numérico = "+$valor); //index definido pelo nome da coluna...
asked by 30.07.2017 / 22:12
3
answers

external HTML in div without server

I own an Index.html page is a series of other html pages. I need to make clicking on a link the specific document appear in a div. Detail, I can not use PHP include because I can not mount a server for different reasons. I can not use the load b...
asked by 19.04.2017 / 05:04
1
answer

Is it possible to use addEventListner in this way?

I'm studying javascript and decided to play around with the creation of fields with DOM CORE . This is the code I've done so far: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name=...
asked by 11.12.2017 / 01:40
1
answer

Check if an input was loaded with jQuery

I need to check if an input text was loaded on the page and check if it is populated, how can I do that? I've tried $ ('input') on ('load') but it does not work, and the way the script is done I can not make a $ (document) .ready. Who knows a so...
asked by 07.09.2016 / 20:48
1
answer

HTML manipulation with PHP / JS

How to get content from a page with JavaScript ? With the content obtained through JavaScript (or PHP), how to manipulate it in both languages, in order to read the values, just like we do in JavaScript when we are manipulating DOM elements....
asked by 17.10.2015 / 03:22
3
answers

Show image after loading via ajax

Hello, I'm setting up a site without refresh. When the user clicks on the clients tab they are loaded blades of the same, however as the embedded images have a 2mb and end up loading per part. I wonder if there is an event that checks if a...
asked by 03.05.2018 / 21:13
1
answer

Reinserting elements in another part of Body, html and Javascript

I'm trying to store in a var, and then reinsert in body 3 elements of type " p ". <body> <p> Um</p> <p> Dois </p> <p> Tres </p> .... When you do this: <script> var parag = document.quer...
asked by 11.04.2018 / 14:47