Questions tagged as 'javascript-eventos'

1
answer

How to validate field when losing focus?

How should I call this PIS validation function in the input when I lose focus? <script language="javascript" type="text/javascript"> var ftap = "3298765432"; var total = 0; var i; var resto = 0; var numPIS = 0; v...
asked by 03.04.2017 / 14:10
2
answers

Element Problem with char and number

I'm not able to do math operations with this function, obviously because it has char type elements inside. var centesimas = 0; function inicio() { control = setInterval(cronometro, 10); document.getElementById("inicio").disabled =...
asked by 17.03.2017 / 18:57
1
answer

Code for window flap / window / browser tab

Good afternoon, as I'm not good at javascript, so I need the masters here to help me. I'm building a system via a browser for a company. In this system will happen several events, and as I wrote in the title, I need a code so that when the user...
asked by 18.04.2016 / 20:30
2
answers

indexOf is not recognized within the for

Hello, I am trying to execute this code so that it captures all the links on a page, everything works ok, the problem is that I want to find links that contain a certain word using indexOf error in log .. Uncaught TypeError: str.IndexOf is n...
asked by 13.04.2018 / 19:53
1
answer

Change wallpaper according to JavaScript temperature

I made a FreeCodeCamp project where it is to do a Local Weather (Local Weather). I used the API of their own project, already ready, but it does not change the background . I want to change the background as per the temperature and capti...
asked by 26.07.2017 / 03:29
1
answer

Change information with JS-JQUERY

I am trying to change a certain value inside my html code, through JS-JEQUERY, but it is not changing, my logic is wrong? Follow the code: var valor = "texto"; $('.botao botao-comprar principal grande desativo with-popover').on('click'...
asked by 13.12.2018 / 15:59
1
answer

How to manipulate DIV with angle 2

I have 2 DIVs and would like to manipulate them with buttons. I have 2 DIVs. When one appears the other is hidden, vice versa. Can someone help me ? my version of Angular is 5.    Function1    Function2                 content -2     
asked by 24.09.2018 / 23:00
1
answer

Assign NAV command on buttons - Owl.Carousel

I would like to understand how I pull the Owl.Carousel NAV's command for my already styled buttons on a separate div. Example: Samplecode: $(document).ready(function(){ $('.owl-carousel').owlCarousel({ loop:true, margin:10,...
asked by 13.09.2018 / 00:16
1
answer

Loading script.js (external) using DOMContentLoaded?

I'll introduce my test code for a better understanding. index.php <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Teste</...
asked by 03.09.2018 / 21:51
1
answer

JavaScript Menu GetId

I have a menu that has a hoverline effect ("a line that runs down the clicked element!") with JavaScript, however it is created using getId by pulling the ID of the elements. The challenge is to duplicate the menu keeping the 'hoverline' effe...
asked by 02.09.2018 / 07:06