Questions tagged as 'javascript'

2
answers

How to get the element id from its class

I have the following list: <ul id = "qualquer"> <li id = "listitem1" class = "middle_item"> </li> <li id = "listitem2"> </li> <li id = "listitem3"> </li> </ul> In my pr...
asked by 22.05.2015 / 15:22
3
answers

Effect of filling a line

I need to make an effect like this on this site link Wellwhereisitmarked?IwouldliketoknowhowthiseffectworksandifthereisanypluginforitFollowmytestcode: .chart { margin: 0 auto; position: relative; width: 70px;...
asked by 20.05.2015 / 19:07
2
answers

Problems printing a JSON table

I can not print the table, what's wrong with my code? var json = [ { "tempoNS":104095548, "tempoMS":104, "tamanhoArray":9000, "nome":"Bubble iterativo" }, { "tempoNS":84671736, "tempo...
asked by 30.04.2015 / 03:57
4
answers

How this operator is not working in this code?

Code: var i = 0, finished = false; while( (i < acentos.length) && !finished){ Question: I have a bool variable getting false, and in my while I'm denying it. If I am denying a false variable, it will tr...
asked by 12.07.2017 / 03:36
1
answer

UpperCase Input does not work in document.getElementById

I have an input: <input id="id_nome" name="nome" type="text" class="form-control" style="text-transform: uppercase" autofocus required> When I type it is uppercase thanks to transform: uppercase , but when I try to read the cont...
asked by 13.07.2017 / 16:45
2
answers

How to return these values outside the Array?

How do I get all the values that are inside this foreach and show off it? It only takes the last one when I give ALERT: var arrayAdicional = item.ingrediente_adicional.forEach(function(ingrediente) { prodadicional = ingrediente.ingrediente.n...
asked by 13.07.2017 / 22:47
3
answers

Show input when user selects option

How do I show the label name and the input name only when the user selects the inactive option? <div> <label>Status</label> <select name="status"> <option value="Ativo">Ativo</option> <option va...
asked by 23.08.2017 / 19:57
2
answers

What is the good solution to replace alert?

In a question , how to do alert , has one answer, the most voted, that says:    The alert is not a good solution to show some message to the user in the browser but I will answer what you asked ... What would be the good solution...
asked by 26.06.2017 / 19:56
1
answer

Get product id with Jquery

I have the following code html :    When he clicks delete on div excluir-produto-carrinho he should get the id of the data-id-prod-cart . How do I do this? I have tried the delete button which is the div excluir-pro...
asked by 15.08.2017 / 16:06
2
answers

Calling a function with the variable name

I have a function that should be called, but its name is dynamically mounted, based on a variable that will come as a parameter. Follow the functions as an example. The first one is called and takes the name of the program. Call the second on...
asked by 27.07.2018 / 17:48