Questions tagged as 'javascript'

1
answer

error importing module

I have this module in a file called timer.js module.exports = { iniciar(){ console.log('oi'); } } I'm trying to import this module into the index.js file as follows: const timer = require('./timer'); Only this error is...
asked by 17.09.2018 / 14:36
1
answer

Browser / Title Guide blinks when reaching specified time

I have the following code: function startTimer(duration, display) { var timer = duration, minutes, seconds; myInterval = setInterval(function () { minutes = parseInt(timer / 60, 10) seconds = parseInt(timer % 60, 10); minutes...
asked by 06.08.2018 / 18:51
1
answer

How to remove javascript cloned elements

How to remove only the last cloned node? document.getElementById("add").onclick = function clonar() { var linha = document.getElementById("linha"); var clone = linha.cloneNode(true); document.getElementById("saida").appendChild(clone);...
asked by 05.08.2018 / 21:31
1
answer

background-color with animation and pulse

Hello! Good afternoon. I am trying to provoke the following effect: when passing the mouse over a "a" tag, the background-color of the parent div in which this "a" tag is daughter, may change in transition but in a circular format where this cir...
asked by 05.08.2018 / 21:04
3
answers

Restart the count if you exceed the options

This question will probably be answered in less than 5 minutes from so easy, but I'm breaking my head ... I'll simplify a lot here, but I think you can understand: I create elements by javascript, each has its background color, there are 8...
asked by 06.08.2018 / 19:33
1
answer

Rename files in a folder in a sequential way - JavaScript

How would you be able to rename files of the same format but with different names (for example: Images) to a sequential pattern? Example: From titulo-capa.jpg | foto-perfil.jpg | background.jpg To imagem01.jpg | imagem02.jpg | i...
asked by 08.08.2018 / 19:31
1
answer

Which operator should I use in the JavaScript c: if I want to be between two variables?

Gentlemen, I need to know which operator to use in Javascript's c: if when I want to make a decision between them, for example, I need a background of a Div to turn red when it is between date x and y, is the "ENTRE" operator, here is a snippet...
asked by 09.08.2018 / 21:23
1
answer

Trying to create a placard with javascript

Hello, I'm a computer student and I made a game with html, css and javascript. Unfortunately when I created the score I ended up with a problem that I believe may be overlapping. The program displays the right score before clicking the doll, but...
asked by 29.08.2018 / 16:37
1
answer

Sort vector from lowest to highest

PHP: array_push($var, $linha['data']); array_push($var, $linha['data_t']); array_push($var, $linha['data_f']); usort($var);// Adicionei essa linha para tentar formatar as datas da menor pra maior mas retornou o erro Warning...
asked by 29.08.2018 / 22:41
2
answers

View Image in JavaScript

I have table made in Javascript, follow the image below: FollowtheJavascriptcode(Codeisworkingperfectly):$(".js-tbody-historico-cliente").on("change", function() { var codigo_cliente = $(codigoCliente).val(); var tipo_busca = $(tipoBusc...
asked by 30.08.2018 / 22:53