Questions tagged as 'javascript-eventos'

1
answer

Collapse in header with pure javascript

I would like to make a header that when scrolling down the scroll bar, it compresses its contents. I have the following script so far. window.scroll(function() { var scroll = window.scrollTop(); var element = document.getElementById(...
asked by 05.09.2018 / 20:23
1
answer

Duplicate div without duplicating JavaScript

I need the following help: I was able to put together two codes that I found on the internet, and edited the formatting to my liking. I have a gallery with images and overflow horizontally, my code works, however I need to repeat the complete...
asked by 14.08.2018 / 23:56
1
answer

Touch effect / click and drag with mouse

I have a gallery with horizontal scroll, I would like to know if it is possible to put a click and drag to move the scroll, like a touch dragging with the mouse. obs: images will be linked. My Gallery: function mostra(theId){ var th...
asked by 07.09.2018 / 08:37
1
answer

how to create output event in click on JS

I'm using this function for when an icon is clicked the menu disappears. let sidebar = document.querySelector('.sidebar-page') let sidebar_toggle = document.querySelector('.sidebar-toggle-box') sidebar_toggle.addEventListener('click', functio...
asked by 25.05.2018 / 18:58
1
answer

event with scroll javascript

I have the code below creating the effect of fadein and fadeout with the animate.css library in a scroll event, but when the event occurs applying fadeOut, it reappears until it scrolls, and the other error is that while the scroll is less than...
asked by 31.05.2018 / 06:43
1
answer

effect in attr ('style JavaScript

I need to run this grayscale filter gradually, gradually applying it gradually over a period of time. $('#backstatic').attr('style', 'filter: grayscale(100%)'); This is my line, I would like to know if you can set the time for the filter ef...
asked by 15.06.2018 / 06:08
1
answer

Countdown in javascript

I have the following code which is to make a countdown over a cookie it will be redirected, but it is not printing on the page someone can help me var tempo = new Number(); // Tempo em segundos tempo = 300; function startCountdown(){...
asked by 24.04.2018 / 20:24
1
answer

How to return to the initial value after a change in the event

I have this code: let inicial = 0 let vPag = 3 const numeros = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]; render() function resultadoPag(pagina){ vPag = pagina.value; render();...
asked by 24.02.2018 / 18:28
1
answer

How to make a POST request in the browser console?

Good evening everyone! I'm studying penetration testing on an attack-oriented research site. For me to register, I have to "hack" the registration page. Basically I have to type a function in the browser console and it automatically generates th...
asked by 03.03.2018 / 03:23
1
answer

Validate an array of TextBox in JavaScript?

Hello my question is this, I have a js function like this: function testeCampos(elemento) { //Recebe lista de campos para valida��o var camposArray = new Array(); camposArray = elemento; //Recebe campo armazenado no array var campo, recFocu...
asked by 13.12.2017 / 17:49