Questions tagged as 'javascript'

1
answer

JSON return in an array in LOOP

I need to store the return of JSON to an array, that is: $.ajax({ type: "POST", dataType: "json", url: "/engine/listarPublicacoes.php",...
asked by 28.11.2014 / 12:35
1
answer

Paste HTML element via Javascript using getElementsByClassName

What is the problem with this javascript code? The function always returns error. <!-- IMAGEM --> <img class="coverPhotoImg photo img" src="ABC.JPG" alt="Foto 1"> <!-- IDENTIFICAÇÃO ---> <span class="hidden_elem enableFrie...
asked by 26.07.2015 / 00:37
2
answers

Set JS variable in input value HTML

I have several inputs in an HTML where the IDs are correct. I want to get value of these Inputs with these JavaScript variables, however only the Input of nome takes the value of the variable! The rest of the inputs are empty: $...
asked by 20.02.2015 / 17:24
1
answer

Smooth scroll anchor link

The following JS is intended to promote smooth scrolling when we click on anchors in a one-page site. Is it possible to restrict the performance of it only at resolutions higher than 760px? $(document).ready(function () { function filter...
asked by 24.02.2015 / 20:51
3
answers

JavaScript function returning Undefined

I'm having a problem with a JavaScript function. I need to check the existence of an item in the database and so I use a js function with ajax called verificaExistente . The php returns me a Json and in this function I check if there are e...
asked by 12.03.2015 / 13:43
2
answers

Collect value of a return

{"finalOFX":{"0":"276.67"},"0":null} So it is returning from PHP, as in javascript I give alert and only display 276.67 I've tried alert(dados.finalOFX) , but Object: Object appears     
asked by 13.03.2015 / 20:55
1
answer

Open a span when the image loaded by Jquery loads

This is the Jquery code: What I want is that when I click the loaded image it displays a span with a text at the end of the image. (function(){ /* Private variables */ var overlay = $('<div id="galleryOverlay">'), slide...
asked by 28.03.2015 / 23:03
2
answers

Clone of an image

I have the code that moves images in SVG with the mouse. When I move the image, as soon as it is released, I want your clone to appear in the position the first one started and that it is also possible to move it. I have an example here, with th...
asked by 21.03.2015 / 16:42
1
answer

Prevent screen scrolling while opening modal

I'm creating a single-page site with five sessions, each one scripting the screen size. In one of these sessions, you have a button that will open a modal that will be the front of all the contents of all the sessions. With the modal open, it is...
asked by 30.03.2015 / 15:47
1
answer

Why is my radio input returning "on"?

I have this code : $(document).ready(function(){ $("[name='valor1']").on('blur',function(){ $(".empresa1").text($(this).val()); $(".valor1").val($(this).val()); }); $("[name='valor2']").on('blur',functio...
asked by 07.05.2015 / 04:08