Posts by Johnny Gabriel • 98 points
4 posts
-
4
votes1
answer178
viewsQ: How does this regex work in js?
I found on the internet this regex in javascript that formats monetary values in R$: Number( 1450999 ) .toFixed( 2 ) .replace( '.', ',' ) .replace( /(\d)(?=(\d{3})+,)/g, "$1," ) // 1450999 ->…
-
0
votes1
answer649
viewsA: Change table with jquery javascript
In your case it would be better to control the selected products with an array of objects, for example: var produtos = [ { id: 0, nome: "lorem", valor: 0 }, { id: 1, nome: "lorem 1", valor: 0 }, {…
-
2
votes1
answer129
viewsA: Lost variable value ( Javascript )
You need to pass a callback function to run at the end of the request, otherwise you will have problems assigning values asynchronously. Take an example: var User = function() { var username; return…
-
-1
votes3
answers447
viewsA: How to make the content appear in the DOM only after clicking - Angularjs
Use a combination of ng-show/Hide with a control variable that changes value after clicking.
angularjsanswered Johnny Gabriel 98