Questions tagged as 'javascript'

1
answer

checked="checked" does not work on ng-repeat

I'm working on a resume feature where basically the user will click on their radio button in which he has experience. The problem is that for a list that will come from the backend , which is now static, checked is not working, ev...
asked by 11.11.2017 / 04:30
2
answers

Javascript Delay

I need to run a for loop every 2 seconds, how can I do it? for(var i = 0; i <= 5; i++) { console.log(i); }     
asked by 10.11.2017 / 12:43
1
answer

How do I switch between 2 style sheets?

Well, I have a site that all its color is gold and black . Some font colors in gold, then golden, gold sidebar, etc ... How do I, when I put a button on the side of my site, written "purple version", and the visitor clicks this button, ch...
asked by 10.11.2017 / 05:31
1
answer

Unit test of a javascript fetch function with jest or mocha

I'm starting TDD studies and came across a function like this: const fetchexample = callback => { fetch('/token', { method: 'POST', body: 'user=teste' }).then(res => res.json()).then(json => { localStorage.setItem('tok...
asked by 09.11.2017 / 12:56
3
answers

Operations with multiple input js

I'm developing a system and in a certain part it has the following structure, image below Followthecode WhatIwanttodoiswhentheusertypesinthe"Braces" field and in the field "Weight" he makes an account and returns the value in the field "Total P...
asked by 29.09.2017 / 16:25
1
answer

Comparison of tables

I am creating a system of bolão, where the administrator registers the games and the scoreboard, and the user has the option to kick a scoreboard, if this score is the same as the one registered by the administrator he informs that the user has...
asked by 06.11.2017 / 12:24
1
answer

WebPlayer modifiable with JS

I'm creating a "WebPlayer" page and I need two things in it: 1: A list with the EPS that when clicking change the link inside the embed "video" 2: Function to manipulate the embed "video" and redirect the link of it from a JS ... This i...
asked by 07.11.2017 / 18:06
1
answer

Help with ajax to send new variable value on this page without refresh via radio button

I'm trying to make a table with a radio that when I click, it changes the order that the contents of the table is displayed, I saw that the way to do this is with ajax, but I do not have much time remaining, and from what I saw ajax I could not...
asked by 06.11.2017 / 21:54
1
answer

Find element to remove via jQuery

I have a routine in JS which is as follows: $('body').on('click', 'a.remover', function(e) { e.preventDefault(); $(this).closest('.info').html("<p>Escolha ao lado</p>").parent().find('input[type=hidden]').val(); }); I wo...
asked by 04.10.2017 / 22:59
1
answer

How to check the size of a div and adjust it by jquery?

How can I check the size of a div with jquery? The height of this div is automatic, but I would like to limit its size. I'm assigning a class to this element, since it's within a loop of my server application, so it will repeat itself. The logic...
asked by 08.11.2017 / 20:58