Questions tagged as 'javascript'

1
answer

After .load in a div, js no longer works

When I go to some site page and try to run the functional script, it only works when I give f5, ie it does not work with .load in a div. JS $(document).ready(function(){ var content = $('#content'); $('a').live('click', fu...
asked by 02.02.2017 / 16:52
2
answers

Which event executes first, javascript or asp.net?

I have a method in javascript on a button, which is triggered with the click of the button, but this same button triggers an ASP.NET event. The js event performs a method that processes a value and this value I play inside an asp (). The asp eve...
asked by 01.02.2017 / 20:25
1
answer

How to display a menu according to the type of user logged in with Ionic / Angularjs?

Hello, I have two types of users: buyer and seller. How to display a menu according to the type of user logged in with Ionic / Angularjs? Currently, and it does not work well, I'm putting in every menu item an ng-show: ng-show="permissao...
asked by 01.02.2017 / 13:48
2
answers

Arrange multidimensional array in javascript, preventing the next item from having the same type as the previous one

I have a logic problem here. Let's see if you can help, because I'm burning neurons here and I have not found a starting point. I have an array of objects and I need to organize them in a way that the previous item can not be the same as the...
asked by 23.11.2016 / 03:56
1
answer

Multiline string with JavaScript [duplicate]

I have a small string to display in JavaScript, but after much trying, I learned that if there is enter in the middle of the string snippet, it will not be displayed. Can anyone explain to me if there is a way to organize the code without maki...
asked by 21.11.2016 / 02:50
1
answer

function result is given as undefined in javascript

I have the following code: function calculaDiasDeVida(idade) { var dias = idade * 365; }; function calculaBatimentos(dias){ var batimentos = dias * 24 * 60 * 80; }; idade = parseInt(prompt(nome + ", agora, quantos anos você tem ?")); v...
asked by 21.11.2016 / 18:17
1
answer

put a load with jQuery on the button

I have a very simple button, but I wanted to know if it is possible to put a loading button when it is clicked. I wanted to use jquery. Follow the code for my button. .button { margin-top: 12px; margin-right: 20px; border...
asked by 22.11.2016 / 17:27
1
answer

how to change an image by clicking on a link

Hello, how do I change the src of an image when I click on a link to move forward? I have a long list of images and I would like to go forward according to the amount of images in that folder, instead of one by one that would be more than exhaus...
asked by 20.11.2016 / 15:12
2
answers

Retrieve callback return

I have the function below that calculates distances using a Google API. I would like to know how to get the callback function returned. <script type="text/javascript" src="_global/_js/jquery-2.1.4.min.js"></script> <script s...
asked by 16.10.2016 / 20:11
2
answers

How to get values with space in JSON

Hello. I'm having a problem with a popular select with JSON. When the value has 2 or more words the 'value' of my option is not filled correctly. Example: { "Marcas": { "Acura": { "Modelos": ["Integra", "Legend", "NSX"] },...
asked by 04.10.2016 / 00:00