Questions tagged as 'javascript'

4
answers

Change the position of a li to the first position

I have the following <ul> : <ul class="opcoes"> <li id="">Escolha a opção abaixo</li> <li id="1">1</li> <li id="2">1</li> <li id="3">3</li> </ul>...
asked by 29.09.2017 / 22:40
2
answers

Javascript - How to validate fields in a form

   I am creating a form that I need to validate: Email, CPF, Birth Date, Contact Phone, Optional Phone . Someone knows how to do this with that "mask", that when the person types the date for example, does not need to insert the "/" slashes...
asked by 21.08.2016 / 16:54
2
answers

Is it possible to optimize this javascript code?

I'm making a page that works like a GPS for a character in a given game. The content of the page is nothing more than a map with a marked path, and 240 images overlap this map to "tag" the character's location. The 240 images take 40 minutes...
asked by 29.01.2017 / 22:23
5
answers

function to count amount of DIVs [closed]

I need to create a function to check the amount of DIVs on the screen and insert a class within the fourth for example. These DIVs are created dynamically.     
asked by 13.06.2017 / 16:41
3
answers

mark a checkbox and uncheck the others

Depending on the Snippet below, when clicking on a checkbox , the others should be deselected, but only happens if you click them from right to left, if I click them from left to right, nothing happens. Does anyone know what's...
asked by 08.06.2017 / 19:48
0
answers

Uncaught TypeError: object is not a function. Clone html and Back button [closed]

I'm having a system problem where I need to make a back button and thought of a function to clone using and a function for the back button. But the problem is that when I log into the system I go to a menu and when I click on an option it...
asked by 02.02.2015 / 13:16
3
answers

How to do a function to tell when an array is empty?

I need a function that tells you when an array is empty. But the way I tried to do it is not right, can anyone help me? function validaCampo(){ if(count(dias[])==0) { alert("O Campo Dias disponíveis é obrigatório!");...
asked by 11.09.2017 / 22:14
1
answer

Autocomplete does not show results in input in View

I've seen other cases in some answers here, tried to follow in the footsteps of other answers and it did not help at all! I'm having a question, this is my first time using autocomplete of jquery , I'm new to asp.net mvc ! I w...
asked by 20.01.2015 / 14:48
0
answers

How to modularize an app made in Sammy.js with Require.js or "module pattern"?

I have an app (mobile app) written in Sammy.js with 4 routes. Each route has 40 to 70 lines of code and a evento bindado . Writing everything in a single callback of app is turning into a beautiful pasta because these events (...
asked by 17.02.2015 / 01:04
1
answer

AJAX request error - ASP. Net and JQuery

I have an aspx file where I created a script with an AJAX call to execute method populaGridMembros on table gwMembros , method is working perfectly and returning a string in JSON format, when I run $.ajax does not work, it...
asked by 16.01.2015 / 04:50