Questions tagged as 'javascript'

1
answer

Why is the lenght of the array as undefined?

I need to count the size of an array and its lenght gives as undefined. Why? ('body').on('click', "#btnGravar", function() { $("input:checked").each(function() { var infoPedidos = []; var classes = $(this).attr("class"); var...
asked by 15.06.2018 / 15:20
1
answer

effect in attr ('style JavaScript

I need to run this grayscale filter gradually, gradually applying it gradually over a period of time. $('#backstatic').attr('style', 'filter: grayscale(100%)'); This is my line, I would like to know if you can set the time for the filter ef...
asked by 15.06.2018 / 06:08
1
answer

How important is .env in React?

I'm developing a website in React and I came across the .env file and it contains the following script NODE_PATH=./src for what would be its importance in React? Because my server only worked when I include this file in the project direct...
asked by 15.06.2018 / 15:59
1
answer

Youtube videos on the site (audio only)

I need to create a radio for a client, where she will have how to choose what to play, by rhythms, singer, band, etc. I would like to know if there is any way to capture playlists and videos from youtube to the site , but to play them in audio a...
asked by 17.05.2018 / 19:31
1
answer

Problems rendering main.js of Vue.js

I am new to Vue and I need to maintain a project .. the problem is this: I have in the main.js the route scheme .. main.js import Vue from 'vue' const app = new Vue({ el: '#app', data: { message: 'Hello Vue!' } }); p...
asked by 17.05.2018 / 16:59
1
answer

Generate a list of sentences ordered by arraySort () in js

I'm trying to create a list of sentences sorted alphabetically using arraySort () in JS, but using the code below, returns a duplicate phrase. Any idea how to do it differently? //Cria lista de textos var lista = []; lista.push( "Amanhã vou...
asked by 17.05.2018 / 00:27
1
answer

Onfocus input change type and assign a value at the same time

Hello, I have the following code. What I have today is that by clicking on input it changes the input to date, but I would like to click it to keep changing and assign a date, I already tried onfocus="(this.value='2018-06-21'...
asked by 21.06.2018 / 15:16
1
answer

Problem with a function in javascript

I'm trying to do a function to calculate IMC, but when I try to run it gives an error:    "Uncaught ReferenceError: imcDoPrimo is not defined       at " var mostrar = function(frases) { document.write(frases); } var pularLinhar = functi...
asked by 14.05.2018 / 08:17
1
answer

GDrive API Upload files javascript

I followed all the steps and some other questions that I found in the stack, and using the following code I can upload a file to Google Drive: var importFiles = $('#files')[0].files; const boundary = '--pd_upload'; const delimiter = "\r\n"+bo...
asked by 13.05.2018 / 22:31
2
answers

NAVBAR transparent

Personal a half-beast doubt, I'm doing a landing page and wanted to use a navbar-style from that site here: link When it is at the top of the page it becomes completely transparent and as soon as the page goes down it already gains a...
asked by 17.06.2018 / 05:07