Questions tagged as 'javascript'

1
answer

How to replace an index with a String

I'm listing numbers from 1 to 15 and checking if the number is divisible by 3 and 5 by adding a text when true, so far it works, but only that it still displays the number under the text, how do I change the number for the text...
asked by 25.09.2018 / 18:04
1
answer

Hiding / Showing a navbar according to scrolling

Next, I have this code: // Function that hides / shows subnavbar according to scrolling $('#view-2').scroll(function() { var topo = $(this).scrollTop(); // = 0 if (topo > 0){ $('.subnavbar').fadeOut(); } else { $(...
asked by 28.09.2018 / 18:31
1
answer

Prevent undefined of elements that may or may not appear in the document

The JS DOM below is for modifying through classes, the styles of two elements that are dynamically created in the document. But it is not always that these elements will appear in the document. Maybe they show up, maybe not. When they are, the c...
asked by 01.07.2018 / 17:33
2
answers

Send DropDown value to Iframe

How do I send a value from a Drop Down to an [ IFRAME ]? I'm recovering the value like this: function mandaIframe() { pai = parent.document.form1; // especifica o elemento de id="formularioX", dentro do documento que é pai da página....
asked by 03.07.2018 / 16:59
1
answer

Auto complete input text with radio button

As I do not know much about javascript I need a help to make this script work down What I need is that when selecting a RADIO it autocompletes the input text with the value contained in the corresponding RADIO. Note that in the Value of th...
asked by 15.12.2018 / 03:18
1
answer

How to avoid the Chips component of the Materialize in white?

I'm using the materialize chips in my project but wanted to avoid this default behavior of adding the same empty tag, for example: How do I prevent this and insert the tag only when I have at least one character? What I got closer wa...
asked by 11.12.2018 / 18:12
2
answers

OnSubmit is not working

I'm checking a form with onsubmit , but even returning true it's submit. Here is the function that calls onsubmit: function checkFormModal(){ var senhaAtual = document.getElementById("senhaAtu").value; var alerta =...
asked by 11.12.2018 / 18:18
1
answer

make the setInterval () stop with mouse hover

I'm creating a JS to run the code as if it were slides. <div class="uk-panel uk-panel-box tm-mandato uk-hidden-small widget_recent_entries"> <div class="uk-width-1-1 uk-width-medium-1-4 uk-overlay-hover"> &l...
asked by 07.12.2018 / 16:03
1
answer

Value sum of an array?

I can not display the sum of each line on the screen, values are being added together with the other lines <!DOCTYPE html> <html lang=""> <head> <meta charset="utf-8"> <meta name="viewport" content="width=de...
asked by 17.06.2018 / 01:44
1
answer

Return in array js

I'm trying to make a game of the old one in js, however I can not check if the filled-in index is different from 1 or 2. Any solution? I'm trying to give return in the array but it looks like it will not. Code: link Error in chrome:  ...
asked by 18.06.2018 / 03:18