Posts by Felipe Michael da Fonseca • 813 points
74 posts
-
1
votes0
answers24
viewsQ: Jcarousel does not work control next Prev
I have the following code in jquery, it does Carousel correctly, but next and Prev don’t work. I need to create them dynamically. I wonder what it might be? Jsfiddle file:…
-
1
votes1
answer25
viewsQ: First Child is not selected
I have the following code that generates a slider but the property first-Child does not work. What’s the problem? var elementoSlider = $('#dados-slider'); var mostraImagem = ""; var…
-
0
votes2
answers54
viewsQ: How to sort the DATA of the Jquery url
I’d like to sort the names of data states in ascending order. How do I do this? function retornaEstados() { var opcaoCadastro = ""; $.ajax({ url: urlBase + "estado", method: 'GET'…
-
1
votes1
answer133
viewsQ: Why is this replace wrong?
I have the following function that brings a string as number in javascript. It can bring float value as 10.00 and int as 12. Why is it wrong? Gives as replace is Undefined on the line:…
javascriptasked Felipe Michael da Fonseca 813 -
0
votes1
answer322
viewsQ: How to delete a product with ID in sessionStorage
I have a function that takes the product id and this id checks the product of a sessionStorage. How do I get him to delete the id product? //dadosdoproduto se refere ao seguinte método dadosproduto:…
-
2
votes1
answer240
viewsQ: Pick up product id with Jquery
I have the following code html: When he clicks delete on div excluir-produto-carrinho he must get the id of the data-id-previous cart. How do I do that? I already tried on the delete button which is…
-
1
votes1
answer334
viewsQ: Transform variable into array
I have a variable that calls all people names. var nome = "João Miguel Pedro"; How do I make it become the following array: var nome1 = ["João","Miguel","Pedro"];…
-
3
votes1
answer2591
viewsQ: How to create a JSON using jquery?
How do I create a JSON with several different names? Equal: [{name: "john"}, {name: "peter"}] Could someone give me an example? I tried to do so, but why does he always return the last item twice?…
-
0
votes0
answers185
viewsQ: Products from shopping cart duplicate
I have a problem in the shopping cart in the issue of the checkout button. When I finish the order he should pick up all the products. So far so good, but the question he always duplicates the last.…
-
1
votes0
answers26
viewsQ: Add product if already removed
I have a problem with this code: Why instead of adding only one element from scratch it takes what has already been removed and puts it back? The error is in this list of the displayProducts,…
-
1
votes1
answer694
viewsQ: Shopping cart item is not removed
I have a shopping cart created dynamically, but the problem is that when I delete an item it even removes, but if I try to add another item it takes the one that has been removed and adds again in…
-
1
votes3
answers115
viewsQ: Problem in the price formatting function
I have a pre-formatted value of 6.5. If I put in this function, it returns 0,65. If I put 19.5 he returns 1,95. Why does that happen? function formataReal(numero) { var tmp = numero + ''; var neg =…
javascriptasked Felipe Michael da Fonseca 813 -
0
votes0
answers43
viewsQ: Jcarousel does not activate the Next button
I have a Carousel that is created dynamically with data coming from the database. But when creating dynamically it seems that it does not activate Next. How can I fix this? Follow the codes: JQUERY:…
-
0
votes2
answers152
viewsQ: How to get the searched item with autocomplete?
I have an autocomplete that works perfectly. How do I pick up the searched item and place it inside a div? Type x-salad search and when you click it put x-salad inside the div. The function…
-
0
votes1
answer1709
viewsQ: Pass Ajax URL parameters
I need to pass parameters in the AJAX URL in order to filter the name of the searched product. I mean, I have a type field text and when the person type it already shows the product typed, same as…
-
0
votes1
answer336
viewsQ: Catch up to 3 foreach position
I have a foreach which prints all categories of a JSON. How do I make him take only up to 3 position and stop the loop? The point is I want to create a menu ul with 3 categories and within it create…
-
0
votes1
answer237
viewsQ: Google maps warning: getCurrentPosition() and watchPosition() no longer work on insecure Origins
I’m using Windows with a virtualhost and I need to make the map work on the localhost, only I already have the google key and even so, without putting the appropriate restrictions on the key still…
-
0
votes1
answer429
viewsQ: Dynamic checkbox does not show check arrow
I have a checkbox that even selected does not show the checkbox item. This attribute is created dynamically. See image: When clicked it would have to be selected like this: Follow the code when I…
-
0
votes1
answer703
viewsQ: Pass value of a variable in Array?
I have the following variable: var prodadicional = $(this).attr('data-adicionais'); It returns two string-like values that are: Burger and Bacon. Like I do to put them inside a array? I tried to…
-
2
votes2
answers39
viewsQ: How to return these values outside the Array?
How do I take all the values that are inside this foreach and show off it? It only picks up the last one when I give ALERT: var arrayAdicional =…
javascriptasked Felipe Michael da Fonseca 813 -
0
votes2
answers137
viewsA: How do you get another div with the same name without changing the others?
When you mouse the Item type (small, medium, large), you select the big one; and it changes in X-SALAD and X-ALL the price, that is, the price is equal. However he should only change the price on…
-
0
votes2
answers137
viewsQ: How do you get another div with the same name without changing the others?
Well here’s the thing. I have the following code structure: A div called part-sec that brings all the content of the product. The div-price-product comes with the price. So far so good. But…
-
0
votes1
answer395
viewsA: How to get information in dynamic Jquery
I already solved it, the problem was the parentheses, no parentheses after the parent Wrong: var indice = $(this).parent().index(); Right: var indice = $(this).parent.index();…
-
0
votes1
answer395
viewsQ: How to get information in dynamic Jquery
I have the following code that calls all categories to a menu. They are created dynamically: function retornaCategorias (){ var container = $("#navmenu"); var container1 = $(".top-nav"); var…