Questions tagged as 'jquery'

1
answer

What is the purpose of the with_jquery function?

I'm learning to write UserScripts (for TamperMonkey ) and pretty much all the examples I see make use of a with_jquery function: function with_jquery(f) { if (!jQuery) return; var script = document.createElement("script");...
asked by 06.10.2016 / 17:32
2
answers

Hide element if it is empty

I have a div that is used to display alerts to the user: <div id="page-alerts" style="margin:25px 0;"></div> Problem Example in JSFiddle For formatting issues, it contains margins at the top and bottom, causing...
asked by 16.01.2014 / 20:28
2
answers

Which one to use in Ajax, success or done?

Sometimes I see using success , sometimes I see .done , to handle the response obtained in the request. Which one should I use? Is there a difference between the two? What? Same thing for .error and .fail . I...
asked by 04.07.2017 / 22:18
4
answers

What is the difference between the find and filter of jQuery?

I remembered that there is a function in jQuery called filter . I already know find , but I want to know if there is any difference between them or if they are the same thing.     
asked by 05.02.2014 / 00:53
2
answers

Is it possible to use masks on mobile devices satisfactorily?

Then after a true pilgrimage that yielded some 10 questions, I discovered that the masks I was using do not work correctly on mobile devices. The main ones are (were?): MaskMoney inputMask What happens is that on the mobile de...
asked by 09.10.2015 / 21:48
3
answers

How to fill a numeric field like in internet banking (from right to left)?

In ATMs and internet banking websites there are numeric fields that when you type they are filled from right to left, increasing the number as you type, for example: +-----+--------------+ |tecla|valor do campo| +-----+--------------+ | |...
asked by 13.01.2014 / 18:27
4
answers

How to validate CPF on client side with script?

I'm working with a CPF validation in my controller , but I need to validate when the client exits the input of the CPF and then return a message advising when the CPF is incorrect, alert or something similar. I tried to do somethin...
asked by 20.02.2015 / 01:48
2
answers

Difference between ".attr ()" and ".data ()"

Note that there is a difference between updating or applying a data attribute using the jQuery method .attr() and the method .data() . The examples below can be seen in this JSFiddle . Apply value to non-existent...
asked by 14.01.2014 / 18:38
6
answers

How to disable the scrolling of a web page?

I've been trying to disable scrolling a page. All I have found are solutions of the type: #container{ overflow: hidden; } But this just hides the scroll bar. How would I disable scrolling even with it being displayed on the screen ?...
asked by 20.02.2014 / 00:47
5
answers

JS Mask for Validation of Hours

I'm using jQuery Masked Input in a project. I made a mask like this: <script> $(document).ready(function () { $("#QuantidadeHoras").mask("99:99"); }); </script> The <input> only lets me fill in the...
asked by 25.06.2015 / 02:36