Posts by Eduardo • 155 points
13 posts
-
0
votes2
answers147
viewsA: Exchange images for text when Navbar expands (and vice versa)
let links = document.querySelectorAll('.nav-link'); let button = document.querySelector('.navbar-toggler'); button.addEventListener( 'click', function(e) { e.preventDefault(); links.forEach(link…
-
0
votes1
answer47
viewsA: What kind of relationship for this case?
For you to better understand how to make this relationship and make a description with everything that should be present in the bank. Example: 1 Freezer can have many models, but 1 Model can have a…
-
0
votes1
answer684
viewsA: How to list all categories in wordpress menu automatically?
To enable the wordpress submenu after registering the menu in functions, you add in the array of wp_nav_menu( array( 'depth' => 1 )); By default it comes 0 any doubt just see the description of…
-
-1
votes2
answers453
viewsA: Is it possible to return a float value with 2 decimal places to end 0?
var product_price = '100.00'; var value = parseFloat(product_price).toFixed(2); console.log( value ); In case to keep everything you’ve done and add the method toFixed(x) with the number of decimals…
-
0
votes2
answers47
viewsA: How to manipulate another Window Front with JS
var pesquisa = "string que quero no input"; var janela = window.open( "https://www.google.com/?q=" + pesquisa, "_blank" ); See if this helps, the text you put in search will enter as a GET in the…
javascriptanswered Eduardo 155 -
3
votes1
answer226
viewsA: Sum with javascript returning wrong value
var valor = parseFloat("3.50"); console.log(valor + valor); You are turning the string into Integer it will round down pattern, in case you can round up using Math.round() or how you are using Real…
javascriptanswered Eduardo 155 -
1
votes2
answers47
viewsA: How do Insert in the bank for forms on the same page?
If your problem is just when you click the send button do not want the page to reload you can use the Javascript method preventDefault(), but if your doubt is different, try to make it clear so that…
-
1
votes2
answers161
viewsA: Pass value with discount to Pagseguro
See in the documentation of PAID, You can set percentages of discounts to be offered based on the payment method chosen by your customer, during checkout, in the Paypal environment.…
-
1
votes2
answers36
viewsA: Polular select component in html page with data coming from table
I don’t quite understand your question, but if you want to do something dynamic, asynchronous, that when the person is selecting the item in select, you can do a new database search and popular the…
-
0
votes3
answers425
views -
0
votes4
answers60
viewsA: Averaging
The code was done correctly, only the splitter order was wrong. When you put the division with (2 / number of the sum) the divisor is the number of the sum (greater than the number to be divided) in…
javascriptanswered Eduardo 155 -
0
votes3
answers392
viewsA: How to fill in Wordpress theme’s own form data using jQuery
$(document).ready(function(){ var urlBase = "http://fipeapi.appspot.com/api/1/"; $("#marcas").hide(); $("#veiculos").hide(); $("#ano").hide(); $("#tipo").change(function(){ $("#marcas").hide();…
-
1
votes0
answers344
viewsQ: Send selected data in an External Json list to email (Fipe Table Query)
$(document).ready(function() { var urlBase = "http://fipeapi.appspot.com/api/1/carros/"; $.getJSON(urlBase + "marcas.json", function(data) { var items = ["<option value=\"\">ESCOLHA UMA…