Questions tagged as 'javascript'

4
answers

Movement of three dots

I want to move the three dots consecutively but do not move vertically, I managed to move them horizontally    I found what I want but with css    link       can it be with javascript? let rootElements = document.querySele...
asked by 24.03.2018 / 04:23
2
answers

How to find out the elapsed time?

Hi I wanted to take out the years, months, weeks, days and hours, seconds that have passed since a date. I have achieved what is shown below, but I can not get the exact account, nor can I subtract the time from years, months, weeks, days, etc ....
asked by 20.03.2018 / 19:01
1
answer

Javascript promises, ajax requests ()

Greetings, I have been struggling for a long time with a problem that I can not solve, I hope you can help me, I have reviewed many callback tutorials and promises but I can not solve my problem. Basically I need to make a request $ .ajax...
asked by 05.01.2017 / 07:23
2
answers

How to hide an html element without losing its space on the screen?

What I want to achieve is to keep some labels hidden either through its clase or its ID , what I'm trying to achieve is a accordion dynamically in horizontal format. If I click on any accordion this should hi...
asked by 26.01.2017 / 22:02
2
answers

Run function according to the status of a checkbox

Good people, it turns out that I have a theme, I'm doing an interface to control an arduino that I have, and what I did was with JavaScript send a GET request when you press the power button and another by pressing the power off button, which I...
asked by 31.12.2016 / 16:58
1
answer

Write in a txt file

What I want is to add "a line of text" every time the code is executed. However what I get is to replace all the content of the txt. I leave my code here. const fs = require("fs"); let ruta = './log.txt' let texto = "Esto es una prueba \n\t";...
asked by 21.12.2018 / 16:52
1
answer

Difference between ways to call a property

Reading a book I found the following:    Once the properties of the object have been created, they can be accessed by two   Forms: obj.nombre = "Simon"; var nombre = obj.nombre; and ... obj["nombre"] = "Simon"; var nombre = obj["nombr...
asked by 24.06.2018 / 15:44
1
answer

How to remove a specific element from an array?

I have an arrangement: [1,2,3,4,5] and I want to delete a particular element. I have achieved this, but I suppose there are other simpler ways in javascript to achieve it. function eliminar(array, elemento) { var resultado =...
asked by 23.01.2017 / 15:10
3
answers

problem with radio input

good morning. The detail is that I have two inputs radius, which when clicking one of them I want to show me a div that is hidden when opening the page, and tried several methods and none works, I want this do in javascript...
asked by 26.10.2017 / 17:45
2
answers

Create a new loop array for JS

I'm trying to create a new array for every round of a for. var route = []; for (var i = 0; i < 5; i++) { route[i].push(result.routes[0].overview_path[i].lat()); route[i].push(result.routes[0].overview_path[i].lng()); con...
asked by 03.05.2018 / 11:03