Questions tagged as 'javascript'

2
answers

setTimeout - the image is not fixed on the screen (p5.js)

Programming in javascript / p5.js I'm trying to use the setTimeout function, but the image, when fired, flashes on the screen, not fixed. The idea is that the ellipse appears after a certain time, and remains. First I thought it was a bug in...
asked by 18.08.2018 / 11:18
1
answer

Insert text of a variable (resulting from an if) within a p after a button click

I am trying to validate the existence of a class in 3 ids to return a text that will be inserted into a p after clicking on the submit button of a form. I inserted the onclick button with the function as value. I do not know where I'm going wron...
asked by 18.08.2018 / 23:54
1
answer

Problems with filter in lib API QUERY PARAMS

I'm using this lib to apply filters api-query-params I need to filter for this entity; 'use strict' const mongoose = require('mongoose'); const Schema = mongoose.Schema; const schema = new Schema({ id: { type: String,...
asked by 17.08.2018 / 18:27
1
answer

Fixed values and values in javascript looping

The code below creates new input and sends the values to textarea , since the number of input is undefined it was necessary to loop to get the values through name , it works normally if it is only <li>${inp1[i]...
asked by 07.08.2018 / 17:23
1
answer

Jquery - use focusIn as a trigger to add a class

Opa Galera! okay? I'm making a form that should be split into two or more steps ... I had the idea to use a ".hide" class in the second "div" and leave it as "display: none;" in css. Then I put another class with "display: block;" my idea was to...
asked by 07.08.2018 / 19:03
1
answer

Find out which function is called in the click

I have a website in wordpress and I use Bootstrap 4. In the footer I have a link back to the top of the page. When I click on it it shows the page animation going up. I generated with javascript another link to go to the middle of the page...
asked by 06.07.2018 / 23:45
1
answer

Problem in ajax

I'm not getting the answer to the ajax request. The code does not confirm whether it is working or not. <script type="text/javascript"> function iniciarAjax(){ var ajax = false; if(window.XMLHttpRequest){...
asked by 07.07.2018 / 19:28
1
answer

show the value of the children inputs of divs js

I need the for / while to display on the screen the string placed in the input of the first div the first time the loop is executed and the second time it shows on the screen the string placed in the input of the second div and so on. > <...
asked by 06.07.2018 / 16:27
1
answer

Convert json to array using pure javascript

I have an object { '1': { 'nome': 'pedro', 'idade': 2, }, '2': { 'maria': maria, 'idade': 5, } } Array [{ '1': { 'nome': 'pedro', 'idade...
asked by 06.07.2018 / 23:19
1
answer

Enhanced ordering with javascript

I have the following function to sort, but, does not sort the accented words correctly ordenaNomeCompleto: function(a,b){ var ans = 0; if(a.nome_completo < b.nome_completo) ans = -1 if(a.nome_completo > b.nome_completo) ans =...
asked by 08.07.2018 / 00:27