Questions tagged as 'javascript'

1
answer

Execute function when the element appears in the gift

How to execute a function when a given element exists in DOM ? For example, I have a list with 4 elements, and whenever a new element comes up I want it to execute a certain function . Sample code below: // Função a s...
asked by 13.09.2017 / 03:52
1
answer

AngularJS Filter multiple table fields

Personal I have a table where you can filter your data using filter, where I pass the filter information through an input: <tr ng-dblclick="openUpdateCadProduto(produto)" ng-doubleclick ng-repeat="produto in listaCadProduto | limitTo:barLi...
asked by 11.08.2017 / 15:18
2
answers

Format table color CSS

I would like my table to look like this. ButwhenIaddthecontenttoit,itlookslikeI'mnotabletoleaveitasthetableabove. functionlistarProdutos(){varconteudo="<table border='1'>"; conteudo+="<tr>"; conteudo+="<div class='ind...
asked by 28.09.2017 / 22:00
1
answer

How can I optimize my code? [closed]

Iwouldliketooptimizemycode,butIdonotknowhowtodoit.Ithastoproducearesultjustliketheoneinthetableabove.Code:functioncalcular(){abiscissa=document.getElementById('ab').value;ordenada=document.getElementById('or').value;//Ordenada-1if(abiscissa==+3...
asked by 24.09.2017 / 01:33
1
answer

How to unlink elements from objects?

I have the following function addPerson = function(id, name) { people[id] = name; console.log(people[id].parentNode); // Exibe corretamente console.log(name.parentNode); // Exibe corretamente name.parentNode.removeChild(name)...
asked by 28.09.2017 / 16:28
2
answers

JavaScript code optimization (JQuery)

What is the best way to write the following code in JQuery? document.getElementById("jogador").style.top = parseInt(document.getElementById("jogador").style.top) - v; Since the beginning of the year I have been programming in JavaScript, bu...
asked by 01.10.2017 / 00:11
1
answer

Traverse all properties of a VueJS object

I'm using VueJS in a project and I need to go through all the properties of the object associated with v-model . I know that if it were an array I could use u for , foreach , map and many other ways to go through it....
asked by 02.10.2017 / 14:20
1
answer

Comparison being repeated gradually in different registers

In my code below I have a table that shows some data and a button to edit. When I click the edit button once it works normally, it opens the modal with the input's fields, and JavaScript something changed to enable the confirm edi...
asked by 29.09.2017 / 19:30
1
answer

In jQuery, how do I make a selection of an element using "this" within one that I am already selecting

I tried to do this: $(document).ready(function(){ $("#formulario").submit(function(){ //Esse trecho não funciona $(this "input").each(function(){}); }); });     
asked by 01.10.2017 / 22:50
2
answers

Error with Electron + Serialport to use Arduino

I'm having trouble running an application made with Electron, Serialport, and Node.Js to communicate with an Arduino. I have the following error: App threw an error during load Error: Uma rotina de inicialização da biblioteca de vínculo...
asked by 01.10.2017 / 23:59