Questions tagged as 'javascript'

1
answer

Function in javascript

Colleagues. I have a file called somar.js that I'm calling in the page index like this: <script src="js/somar.js"></script> The file exists and is correctly inside the folder on the server, however when I place the command b...
asked by 23.09.2015 / 14:24
2
answers

Problems with JSON on the server

Hello I'm having problems with JSON when I upload it to the server .. Example of one of my code that uses JSON : $("input[name=people]").keyup(function(){ if($(this).val() != ''){ $.ajax({...
asked by 08.05.2016 / 01:33
1
answer

button with link inside the form

I have a form with 2 button inside. 1 and the submit and the other I need to put a link on it. When clicked it can not send form and call the link. Follow my code: <form name='form' method=post action='link' enctype=...
asked by 05.05.2016 / 19:37
3
answers

How can I put an array in a JavaScript variable and compare it with the value in the text field?

I have the code below and I need to get several different values at once. One way I thought it was in array else does not work. After Ajax it brings me the results in id zpl , if the result comes empty it returns the warning that do...
asked by 05.05.2016 / 13:25
1
answer

Jquery Scroll Smoth

I have the following JS code: It is applying a smooth scroll to all elements with the reference "#" when I click. JS $('a[href*=#]').click(function() { if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')...
asked by 05.08.2015 / 19:18
2
answers

Load javascript depending on the viewport?

Can you minimize the download of javascript depending on viewport ? I can put different CSS files to load just by checking the size of viewport for example. I have a virtual store project that wants lots of animations and effects in t...
asked by 05.08.2015 / 15:39
1
answer

How to use ajax inside a SweetAlert?

I tried that, but I do not think it's the right way. I'm actually sure, because the code does not work. function removeCliente(id) { swal({ title: "Are you sure?", text: "You will not be able to recover this imaginary file!", ty...
asked by 09.07.2015 / 18:37
1
answer

Function to total input values selected in checkbox

Good afternoon. I have a table on my page with columns of quantity and value of the product. These values are returned from my BD, in each line has a checkbox for selection, I have already done a function to calculate the total of each produc...
asked by 21.10.2015 / 14:02
1
answer

jQuery .clone () method

I need every time I click on the div Mais , clone the total content of it and put it just below. But it's not working, could you tell me what I'm missing? $(document).ready(function () { $('#maisfoto').on('click', function () {...
asked by 08.07.2015 / 16:10
1
answer

Expandable Table With Expansion Rollback

In this script below link I have a table that expands when we click on the line. How can I make it expand one at a time. Example: clico na primeira linha "**expande**" se clico em outra linha **também se expande mas fecha a...
asked by 23.10.2015 / 18:02