Questions tagged as 'javascript'

3
answers

Javascript Timer

Well what I wanted was to do a 60 second timer. That would work as follows: Count 60 seconds in descending order 60,59,58, 57, etc ... and when it reached 0, pause at 0 for 3 seconds, and start all over again 60,59, 58 etc ... How can I do...
asked by 07.03.2016 / 19:17
3
answers

How to set the number of times setInterval will run?

Is it possible to control the number of runs of setInterval ? I made a very simple script where I wanted to div blink 3x to alert the user. But in the script I did it it blinks straight. <div id="my-div">alerta teste<...
asked by 23.11.2015 / 19:35
4
answers

capture option value with jQuery

I have the following select in html. <select name='busca' onChange='link()'> <option value="1">OP1</option> <option value="2">OP2</option> <option value="3">OP3&l...
asked by 17.11.2016 / 11:44
4
answers

Capture screen size at requisition time

I would like to know if there is a way in JavaScript to execute methods at the moment of the request that the client makes to the server. I have a project where I use several large images in the occupied memory, and it would be interesting to ca...
asked by 27.02.2014 / 11:45
2
answers

Using ';' before starting a [duplicate]

It has become common for me to find codes in github that start like this: ;(function(window){ 'use strict'; })(); I just never understood the following. What is the purpose of using ';' before starting the function declaration?     
asked by 19.03.2015 / 15:14
3
answers

Is there comparator operator "in" in JavaScript?

In JavaScript is there a way to use in to check if the value of a variable is contained in a list of values? A visual example: if (tipoDemissao in (1,2,5)){ valorDemissao = 525.20; }     
asked by 12.04.2016 / 14:25
2
answers

How to get input using HTML and JavaScript

As a beginner in the 'JS' language, I would like to know how to simply get text from a <form> (without forwarding to another page and without changing the URL) and passing to a function like alert() when the user enter no...
asked by 19.06.2014 / 03:01
5
answers

Retrieve a json final value in Javascript

Is it possible to retrieve a value from a result of a url by jQuery? My problem is the following, I need to receive the final result of this url: link I need to retrieve this result through JavaScript.     
asked by 20.02.2014 / 03:27
3
answers

How to enable and disable textarea with javascript?

After performing a search on the Site, I found this question with solution , but the solution is in jquery ! When choosing option X, I need a specific field to be disabled and only be enabled again if another option is activated! I...
asked by 05.02.2016 / 16:55
3
answers

Vertical slide navigation including highlight thumbnails

There is a slider here on this site that has a vertical navigation that sits on the right side, which includes the thumbnails of the previous slides and also the following slides. I would like an example to replicate this effect and I would...
asked by 13.06.2015 / 01:32