Posts by Lucas Rangel Cezimbra • 313 points
3 posts
-
2
votes1
answer452
viewsA: How to stop a function through the console?
$( "seu-elemento" ).stop(); This method serves to stop animations in general. .(stop) | jQuery API Example taken from jQuery: // Start animation $( "#go" ).click(function() { $( ".block" ).animate({…
-
2
votes5
answers667
viewsA: Use JS to relieve PHP
TL;DR: depends a lot on your application and the benefit cost of changing the functionality to the front-end. Using Javascript to relieve the back-end is good. But whether you should use it or not…
-
17
votes7
answers53067
viewsA: Knowing if the number is odd or even
to make comparisons is used ==. Example: if(x == y) to know if the number is even or odd it is better to use the rest operator(%). The code at the end could look like this: var n = prompt("Digite um…
javascriptanswered Lucas Rangel Cezimbra 313