Questions tagged as 'jquery'

3
answers

Mask with Jquery changing from fixed to mobile or vice versa

I have a JQuery mask for phone, depending on how much information the user type I understand if it is cell phone or landline. The fixed mask: (55) 9999-9999 for mobile: (55) 99999-9999 the mask code: $("#Telefone").keydown(function () {...
asked by 18.08.2017 / 17:30
2
answers

Show animation while loading?

I have not found much about this subject in tutorials, I do not know if anyone else has noticed that services like Facebook, Netflix use a kind of load before showing the content, both seem to work the same way, in some tutorials said that this...
asked by 13.10.2016 / 23:11
2
answers

Local Storage - Always replaces the last data

I have this code: var ClienteArray = []; $('#btn-save').click(function(){ var cliente = JSON.stringify({ Code : $('#stn-code').attr('value'), Name : $('#stn-name').attr('value') }); ClienteArray.push(cli...
asked by 20.10.2016 / 14:00
4
answers

How to check for an ID in a document via JQuery?

I am programming the system of my TCC and in it I am creating a site that contains two types of ID in the container container of each page: fundo_index in Index and fundo_base in other pages. I need to do a check to know which o...
asked by 08.11.2016 / 19:32
2
answers

Switch menu color on page scroll

How do I change the color of a menu when scrolling the page? I'm doing this $(function() { $(window).on("scroll", function() { if($(window).scrollTop() > 100) { $(".sidebar-wrapper").addClass("teste2"); } else { $("...
asked by 21.10.2015 / 13:58
2
answers

How to make a form submission without form?

The question may seem strange. But on a particular page I would like to make a submit , like a form, when clicking a button, but without the presence of the form in HTML. Is there any way to simulate submitting a form, without it being...
asked by 07.12.2015 / 13:56
2
answers

Get all "checked" checkboxes in a list generated dynamically by jQuery

I have a modal in which it contains a list that is dynamically generated by jQuery via a callback of AJAX . The question is that I need to get the id's of all the "checkbox's" that were selected in it. I'm pretty sure I'll need the ....
asked by 26.08.2015 / 16:12
2
answers

Adding and Removing Fields with Javascript

I need the user to add the same fields as many times as he wants, and also to remove them. I was able to do the script to add the fields, but remove is not working. HTML <a href="#" data-id="1" id="adicionarCampo">+ adicionar campo<...
asked by 03.10.2014 / 14:47
3
answers

$ from jQuery does not work

I'm using a code that uses $ of jQuery, but when using the dollar sign it's error on the console and the jQuery code does not work. The only solution was to use jQuery instead of $ : jQuery(document).ready(function(){ jQuery("#finali...
asked by 16.07.2014 / 02:46
3
answers

How to stop execution of the $ .map function?

How do I stop execution of the $.map function when a condition of if is true? With for I would use a break like this: for (int i = 0; i < count; i++){ if (true) break; } And in the $.map...
asked by 11.11.2014 / 14:53