Questions tagged as 'javascript'

2
answers

How to force loading of JS and CSS files with each new published version?

Every time I publish a new version of my web application (a multi-company system) that has changes in JS and CSS files, some clients complain about errors and I find that it is the cache of the browser and I have to instruct the client to refr...
asked by 03.09.2015 / 20:57
2
answers

What is the function of the operators, and in Javascript

What is the function of the mathematical operators << , >> and >>> in Javascript? Examples: 0 or 1 >> 1 is 0 2 or 3 >> 1 is...
asked by 01.03.2014 / 21:18
2
answers

Detect prolonged click, javascript

Assuming these types of clicks: 1 CLICK 2 CLIQUES FOLLOWED PROLONGED CLICK I know how to detect the normal click and dbclick but how to detect the extended click? that click that you click and hold for X time for example?     
asked by 11.07.2015 / 16:59
2
answers

CKeditor html content gets empty after using jQuery-ui Sortable in your parent div

I want to "sortable" 2 or more div's with a CKeditor populated with html, however when doing this the html of CKeditor loses the content and the editing space gets blocked. Follow fiddle: link HTML <div id='e'> <div id='e1...
asked by 06.11.2014 / 14:57
3
answers

Realization of floating-point accounts in JavaScript with absolute precision

I'm working with financial values and at the time of performing mathematical operations in JavaScript, values are not as expected. console.log(11.8-10.2) 1.6000000000000014 I would like to know how to solve this precision problem to alway...
asked by 04.05.2014 / 17:03
4
answers

Fill in leading zeros in JavaScript

I need to insert leading zeros in a input text field. Since this field can be up to 5 characters + a checker digit That is, I need to fill in the leading zeros according to what the user types, for example: 123451 = 12345-1 12341 = 01...
asked by 18.10.2014 / 00:20
2
answers

What two keys mean in JavaScript

I understand the "===" that tests value and type, different from "==" that tests only value, however I did not understand the double key, type: {{alguma_coisa}} , for example in a JavaScript that I own, has something like this: mozL10n.g...
asked by 03.11.2015 / 11:57
2
answers

How to create a fallback in importing CSS files?

In How should I work with Bootstrap and JavaScript links? , how to serve the files media, either via CDN server or local server, it was answered that it is interesting to keep the two: initially loading the file from the CDN and, in case of fai...
asked by 01.06.2018 / 22:19
2
answers

Is it correct to use JS to make the effects of an HTML?

What I want to know is whether it's right to use JavaScript / JQuery to do some button and screen effects, center content horizontally and do certain tasks that can be done by CSS. The design here of the company said that it is better to use J...
asked by 23.04.2015 / 19:39
3
answers

Alternative to check if the window is a popup

I have a page that can be opened both by my own domain and externally, both as a "normal" window as a popup. In this window, I need to check whether it has been opened as a popup or not, and perform some customizations programmatically. So fa...
asked by 30.01.2014 / 15:59