Questions tagged as 'jquery'

1
answer

How to change the icon of the mobile menu icon to indicate toggle closing?

I'm creating a responsive menu from scratch using html, css and jQuery. I was able to create it and it is working the opening and closing of toggle after click function on an image (the menu icon). The idea is now to make clicking on the menu ic...
asked by 13.09.2017 / 15:41
1
answer

Submission Ajax - Enter

How can I make a submission with ajax using the enter key? That is, I have the following code: var nome = $("#nome").val(); jQuery.ajax({ method: "get", url: "teste.php", data: { "nome": nome },...
asked by 17.09.2017 / 14:04
1
answer

jQuery - hide () and show () does not run correctly

I have items that in a paragraph is displayed the total of the same. When I remove one of these items, I'm working with 2 paragraphs with the same code so I hide one and show the other so I can display the correct value. However, when I click th...
asked by 15.09.2017 / 20:30
1
answer

Does anyone know a simpler way to do this, by showing the text instantly when typing in an input

<html> <head> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script><title>Teste</title></head><body><divid="formVal"> <form name="fvalida">...
asked by 13.09.2017 / 14:25
1
answer

Execute function when the element appears in the gift

How to execute a function when a given element exists in DOM ? For example, I have a list with 4 elements, and whenever a new element comes up I want it to execute a certain function . Sample code below: // Função a s...
asked by 13.09.2017 / 03:52
1
answer

My datepicker should work only on icon

I have the following code: $(".datePicker").datepick(); $("#IconDate").on("click", function () { $("#Date").focus(); }) My Html: <div class="float-left gutter-right field-wrap"> <label for="admissionEndDate">Data Admis...
asked by 26.09.2017 / 14:52
1
answer

Showing results always in same div

I have a problem in my jquery, it always shows the result in the same div , I want the result to appear in the div where the button is . > <div class="accordion-content" style="display: block;"> <div class="clearfix"></div&...
asked by 28.09.2017 / 20:59
1
answer

How to unlink elements from objects?

I have the following function addPerson = function(id, name) { people[id] = name; console.log(people[id].parentNode); // Exibe corretamente console.log(name.parentNode); // Exibe corretamente name.parentNode.removeChild(name)...
asked by 28.09.2017 / 16:28
2
answers

JavaScript code optimization (JQuery)

What is the best way to write the following code in JQuery? document.getElementById("jogador").style.top = parseInt(document.getElementById("jogador").style.top) - v; Since the beginning of the year I have been programming in JavaScript, bu...
asked by 01.10.2017 / 00:11
1
answer

Comparison being repeated gradually in different registers

In my code below I have a table that shows some data and a button to edit. When I click the edit button once it works normally, it opens the modal with the input's fields, and JavaScript something changed to enable the confirm edi...
asked by 29.09.2017 / 19:30