Questions tagged as 'javascript'

1
answer

Javascript function declaration [duplicate]

What are the differences in declaring a function in these two ways: Mode 1 var funcao = function() { // ... }; Mode 2 function funcao() { // ... } What are the advantages and disadvantages of each?     
asked by 03.09.2014 / 22:43
2
answers

Event fires only second, after sequence of user actions

I have a form where there is a table. At the bottom of this, there are buttons to manipulate the rows of the table, and only the selected ones will be affected. StepstoReproduceProblem jsfiddle to check the problem result of fiddle to t...
asked by 17.05.2014 / 01:31
2
answers

How to calculate installments (R $) and fill in inputs?

I would like help to implement the calculation of plots and fill / create the inputs according to the number of plots. Code below and link : $(document).ready(function(e) { $('#condicao-pag').on('change', 'select', function() {...
asked by 24.12.2016 / 21:05
1
answer

"The getPreventDefault () method should no longer be used. Instead, use defaultPrevented "

In some browsers, such as Google Chrome , always when in "mexo" in some element of the page, the following message appears:    event.returnValue is deprecated. Please use the standard event.preventDefault () instead Or:    Use of...
asked by 11.08.2015 / 13:39
4
answers

Make level calculation and experience with Javascript

I'm trying to make a code that takes the value of the experience base ( base ) and subtracts from the experience gained ( bn ), so the code returns how many levels it went up ( up ) and exp remaining. I'm having troub...
asked by 26.08.2015 / 20:19
2
answers

Delete all console logs

There is some way to delete all the logs from the console and start over, like I inserted several logs there using console.log, however I want to remove them all at once and start over again by inserting others. li on console.clear () only no...
asked by 19.03.2015 / 19:37
2
answers

jQuery is still "needed"?

I have recently been asked about the real need to still use jQuery in new web projects. I know that it was, until recently, the best (and in many cases the only) way of handling HTML elements and make Web requests without worrying about differen...
asked by 02.05.2015 / 01:59
1
answer

Problem between PagSeguro and number of plots

I made the implementation of a custom virtual store in the PHP language and as a checkout I am using PagSeguro . In the implementation, the transparent checkout was used and was functioning correctly, but the client requested that the option...
asked by 22.04.2015 / 14:23
2
answers

How to enable and disable links successively?

I have five links, and initially only the first link is enabled. When this first link is clicked, I want it to auto disable and enable the next, that is, the second link, and when the second is clicked, that auto disable and enable the next, and...
asked by 20.01.2016 / 00:57
1
answer

Division between integer and real returns NaN

I'm not sure how to do this: var tamanho = parseInt($("#tamanho").val()); var valor = $("#valor").val(); var valorMl = valor / tamanho; console.log(valor, tamanho, valorMl); valor returns 3,50 . tamanho returns 3...
asked by 31.12.2016 / 17:00