Questions tagged as 'javascript'

1
answer

How to know the direction of the mouse wheel scroll

How to know the direction and amount of the scroll when scrolling with the mouse wheel? Browsers have different ways of passing information on the event object. Some use .wheelDelta , others .detail , and others (new genera...
asked by 12.07.2014 / 00:28
2
answers

How do I get an error alert generated by the Google Maps API?

If for some reason an error occurs and Google disables access to the maps API, an alert of this genre will appear to the visitor:    Google has disabled use of the Maps API for this application. The provided key is not valid Google API Key, o...
asked by 25.12.2013 / 13:56
4
answers

How to jump to the next field using jQuery?

How to move focus to the next field of a table using jQuery? I have a table with the Id , Name and Price fields, the price column is a text input. How to implement a feature for when the user presses the Enter key to jump to the next l...
asked by 20.11.2014 / 15:04
2
answers

How to make a marquee without the tag marquee?

I need to use a marquee , but as everyone is saying marquee is a prehistoric thing and should not be used anymore, I am in doubt as to what to use in his place. On the MDN website it says this:    This feature is deprecated. While it may s...
asked by 04.04.2014 / 23:19
2
answers

What is the hell of the callbacks?

Going through some recent research, I came up with an unfamiliar term for myself: "The callback hell." I was curious and decided to research a little, arriving at the following code snippet: fs.readdir(source, function (err, files) { if (...
asked by 08.03.2017 / 14:11
1
answer

How to find out if JavaScript is disabled?

How can I check and display the message to the user that the browser's JavaScript is disabled? For example, it will do something, and if its JavaScript is disabled I show this message to it, so that it will enable in the browser. What code ca...
asked by 15.09.2014 / 16:46
2
answers

Why does jQuery fadeIn not work if element has zero opacity?

I have an element with zero opacity defined via JavaScript. In practice, this is equivalent to: <div style="opacity: 0"></div> My intention is to use jQuery to make a fade-in effect on the element. I've tried the following:...
asked by 17.01.2014 / 20:10
1
answer

var, const or let? Which one to use?

Recently I discovered the existence of let and const but now I am in doubt which to use constantly? And why do I never see codes with let or const ?     
asked by 20.05.2017 / 07:59
3
answers

Difference between promise and callback

I would like to understand the benefits of using Promise a little better! Today I use callback function. Ex: function a(callback) { $.ajax({ ... }) .done(function(data){ callback(data) }) .fail(function(data){...
asked by 30.11.2016 / 19:40
2
answers

How can I get the results of the lotteries?

I looked for lottery APIs to get the results of the contests, unfortunately I could not find any. The answer from @fpg1503 can only read the result of the current game, I wonder if it is possible to get the results of the previous game...
asked by 20.01.2015 / 16:02