Questions tagged as 'javascript'

1
answer

Compress external JS files

In PageSpeed of Google, some warnings that I sometimes receive, is to enable compression of JS and CSS files. But since I work with external APIs and scripts, sometimes I can not do this. Would you like to get around this "problem" s...
asked by 27.11.2017 / 13:09
1
answer

How to copy a text to the clipboard using ZeroClipboard?

I found several articles saying that this type of action with JavaScript is something "risky" and many browsers prevent this from being done. Also, in the articles I read, they said the only way to do something similar is by using Flash. So I...
asked by 07.05.2014 / 04:23
1
answer

Add and Remove percentage proportionally

Doubt is in mathematics, a calculation that will be used in a program. Let's say I have 3 items with different percentages: Item 1 - 10% Item 2 - 40% Item 3 - 50% I want to remove for example 10% of Item 3 and distribute this percentage...
asked by 08.05.2014 / 23:59
2
answers

Menu that moves by coordinates

I'm doing this site but I can not do two things: The menu has to move to the contents as I click the options When the page load has to appear centralized along with the menu where Instagram has. I tried several methods on the net...
asked by 22.05.2014 / 01:50
1
answer

I need help creating a blocking pattern for Android using the patternLock plugin

I need to create a pattern password with a design for a mobile maintenance site so that when a customer opens a work order and if his cell phone has a screen lock it can be saved and if the technician needs to use it. After much searching for...
asked by 20.09.2017 / 10:42
1
answer

What's the difference between using function with parameter THIS or OBJ?

Now, when I try to use a function, when I put this as a parameter, it was not executed, but when I put OBJ, it worked normally. Can anyone tell me the difference between the two? function mostraCampo(obj) { var select = document.getE...
asked by 06.09.2017 / 17:02
1
answer

Is there still reason to use var in JavaScript? [duplicate]

ES6 introduced the keywords let and const for declaration of variables. Is there still reason to use var ? If yes, what scenarios to use?     
asked by 08.09.2017 / 02:08
2
answers

No Access-Control-Allow-Origin header is present on the requested resource. Origin 'null' is therefore not allowed access. - Phonegap [duplicate]

I have read about this method json and I just do not understand and do not know what to fix, I'm using another domain to get json. Here is my code: $(function(){ var url = "http://website.com/json.php"; $.getJSON(url, function(res...
asked by 11.09.2017 / 17:02
1
answer

How can I get and save this value

I have a program too big for here and so I created a fiddle to illustrate my problem. I want to catch and save a p , but alert is always empty. Can you help me out? HTML <ul> <li>1</li> <li>2&...
asked by 21.05.2015 / 18:21
1
answer

Format data before saving in bank

I am using Laravel to develop a system, but I have a problem with the data coming from a form, I need to format a data in the following format ( #. ## strong>) to perform certain calculations, the problem that the value comes with the f...
asked by 22.09.2017 / 14:06