Questions tagged as 'javascript'

3
answers

How to copy to clipboard without using flash?

Google Chrome is displaying a message. This site uses a plug-in (Adobe Flash Player) that will not be compatible soon. Is there any way to do it without Flash? How? And something that preferably copies an attribute, for example: <a h...
asked by 17.08.2015 / 16:26
2
answers

How do I get the position of an element that uses the CSS transform property?

Imagine that I have a popup that is centered with transform:translateX(-50%) translateY(-50%) (if you have questions about this solution, you can see more about it here , adapted from these Answers ). So far so good, the ele...
asked by 13.03.2014 / 19:44
4
answers

How to control when localstorage data expires?

I'm storing some data in the localstorage of the browser and would like to set an expiration date for this data, but I do not find a way to control when that data expires . Does this data have any control over when it will be discarded?...
asked by 29.01.2014 / 20:20
3
answers

How to implement a "scroll hijacking"

I have noticed in several modern pages a scrolling behavior that goes up to certain interest part of the content, researching, I discovered that this type of behavior is called "hijacking". The term "hijacking" literally translated means "kidnap...
asked by 06.06.2017 / 15:37
1
answer

Get mouse position in percentage by clicking on the image

I have an image on the screen and I need to click on the image and know the position of where I clicked in relation to the X and Y of the image. For example, I clicked the center of the image, so X would be 50% and Y 50%. I tried t...
asked by 04.05.2017 / 22:01
2
answers

Canvas erase correct text

I go through a search and there is no way to make it work, the first attempt works fine, but the second does not, that is, does not delete the text that was there and replace it with the new one (in the corresponding field), I assume that my...
asked by 19.01.2017 / 15:48
1
answer

Scope, nested functions, function call

I am studying this answer and I came across a doubt in a test I am performing, it follows: <script> function x(a1="a1"){ // "x" tem acesso a "a" var a2="a2"; console.log("Consele fx =" + a1); console.log("Consele...
asked by 05.01.2017 / 21:37
1
answer

Animation div with Jquery does not recognize keys

<!DOCTYPE html> <html lang="pt"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> &l...
asked by 31.12.2016 / 19:57
1
answer

Deploy App Node.js on localhost (Production)

I developed an application with Angular + Node.js. The only detail is that there is no centralized server (Node.js), that is, each client will have its version of the server running on your network. Because of this, I had to create ways to i...
asked by 27.02.2017 / 14:14
1
answer

VueJS: how to check all the checks and count their amount?

The problem is as follows: I have several lists with a title, where it serves as a "select all" but it should only select the checkboxes that are its "siblings". But I can not check them in the "select all" of each list and update the fina...
asked by 17.10.2017 / 18:43