Questions tagged as 'dom'

1
answer

Assignment of ID and class in JS [closed]

I'm new to programming, I have a problem, and I have to create a menu from JS without touching the HTML, more or less I've finished it, but I need to add an ID and a class to each tag to be able to manipulate them later Can someone tell me a JS...
asked by 21.04.2018 / 21:18
1
answer

Does not load image in div - Javascript

I have to perform the following operation: I have a form in which I fill in all the data and when I press the "Save" button the user's name must be loaded in a so-called "list". Well, this is done correctly. The problem comes when I want t...
asked by 08.06.2017 / 12:50
1
answer

PHP - loadHTMLFile () does not load the html document

I am trying to modify the code of an html page after filling out a form with the new data that has to be displayed. When I save the form I am directed to a php file to save the changes in the database and from there access the .html file to modi...
asked by 11.05.2017 / 12:01
1
answer

Problems javascript html5 [closed]

I am trying to call an input inside the DOM tree but I can not call it by the "active" class, however when I use task-wrapper the alert appears perfectly. How do I solve it? $(".active > .hideinfo > .wrapper-ca...
asked by 10.04.2017 / 11:12
1
answer

Get instagram HTML [closed]

I have this code, but the file_get_contents does not work correctly. $html = file_get_contents('https://www.instagram.com/'); $dom = new domDocument(); $dom->loadHTML($html); $dom->preserveWhiteSpace = false; $images...
asked by 24.02.2017 / 10:51
2
answers

Event click ignores me the first click

By clicking on the all button, the div content-all would be displayed. Which happens but to the second click. The code works, except that the first click that the user gives (either on the button or outside it) does not generate an...
asked by 10.07.2017 / 16:22
1
answer

Declare DOM items with $

Is the declaration with $ correct to assign items from the DOM to work with them later? If not, should you assign them to normal variables with let ? $table = $('#tblActividades'); $nuevo = $("#btnNuevo"); $buscar = $("#txtBusc...
asked by 07.06.2018 / 11:01
2
answers

this is undefined in addEventListener Callback

Hello, I have the following html code: <nav id="myNav" class="nav has-shadow"> <div class="nav-center"> <a class="nav-item is-tab is-active">Ingresos</a> <a class="nav-item"><h1 id="myTitle"...
asked by 20.07.2017 / 02:46
2
answers

jquery: $ (document) .on ("click" ...) executes the clicks of several selectors

Good morning, it turns out that the "click" events listen to both the selector that I'm dialing with $(document) and those that are above, even if they are not their children and are not called the same. To see it, I put the code of th...
asked by 12.01.2018 / 13:49
1
answer

Problem with my accumulator in my Javascript code

I have a problem with a mini shopping cart that I want to put together. Create an array with the products and their details. Each product has a button that when you press it, it adds it to the shopping cart. In the shopping cart I only have to s...
asked by 29.11.2018 / 19:34