Questions tagged as 'javascript'

1
answer

Bootstrap v4.1 - Collapse does not work correctly

Follow the code below: $('#collapseDescricao').on('hidden.bs.collapse', function () { $('[data-target="#collapseDescricao"]').text("Mostrar descrição"); }); $('#collapseDescricao').on('shown.bs.collapse', function () { $('[data-t...
asked by 28.05.2018 / 22:05
1
answer

Click on dynamically generated element does not work

Hi, I am cloning an element via jQuery and when I click on an item of the cloned element the click does not work, it follows example codes: Cloning: var template = $(".products .product.template").clone().prependTo($(".products")).removeCla...
asked by 06.05.2018 / 04:39
2
answers

How to remove duplicate values from an array of objects easily?

I have the following array: [ { "value":"ETH", "label":"ETH" }, { "value":"LTC", "label":"LTC" }, { "value":"ETH", "label":"ETH" } ] As you can see, there are duplicate values. Wha...
asked by 06.05.2018 / 16:39
2
answers

Inputs value of a form

I'm developing a form with javascript / jquery in which from one question to another it goes to another page and on the last page I have to see all the data typed in the previous questions, I've already tried with serializearray (), but it just...
asked by 08.05.2018 / 21:04
2
answers

How do you pass two parameters in the Ng-click Angular JS?

<button class="btn btn-conf-t btn-deletar" ng-click="deleteCategory(cat.id)"><i class="fa fa-trash"></i></button> Here I just pass one parameter, is it possible to pass ng-click="deleteCategory(cat.id, cat.nome)"...
asked by 07.05.2018 / 14:19
2
answers

Javascript function does not work

I created a Javascript function to get the width of a div and then add that width to 4 other divs, but that is not working. JavaScript window.onload = function() { var slidewidth = document.getElementById("slideshow").offsetWid...
asked by 09.05.2018 / 22:51
1
answer

Difference in creating attributes in Javascript

What's the difference between creating these two ways? function Pessoa() { this.nome = 'lucas' } and function Pessoa() { nome = 'lucas' } Is it time to instantiate to make a difference?     
asked by 03.06.2018 / 07:42
1
answer

SyntaxError: unexpected token: string literal -Javascript [closed]

I'm having this error in the following function: function formaQueryConta(cpf){ var numConta= jsonDtContasCliente[(document.getElementById("listaContas").value)-1]; console.log(typeof(cpf)); //Diz que é String console....
asked by 02.06.2018 / 12:02
1
answer

How to create shortcuts with JavaScript

The script that follows should allow the user to type the combination ALT + C where it would open a prompt and then enter a code to redirect to the page according to the numerical code informed. Script opens the browser prompt window and makes t...
asked by 01.06.2018 / 17:10
1
answer

Reload in javascript

follow the script below: <?php // registrando e incializando arquivos de estilos add_action('init', '__register_script'); function __regist...
asked by 17.05.2018 / 00:03