Questions tagged as 'jquery'

2
answers

How to make the jQuery toggle function in pure javascript?

I discovered a little time and found the toggle function very interesting using functions: $('body').toggle( function(){ alert('A') }, function(){ alert('B') } ); (In the example I put only 2 functions, I wanted...
asked by 11.02.2014 / 22:37
2
answers

Darken screen by clicking the search bar

On the Americas and Submarine websites, it has an effect that, when you click on the search bar, the whole site is slightly darkened to highlight the search bar. I do not know the name of the effect. But would it be possible to do something simi...
asked by 07.02.2018 / 00:31
3
answers

How do youtube know which videos we have already watched?

The question by itself already describes my interest, but what I'm really wanting to know is how youtube stores the information saying that we've already watched that video. I thought about storage with cookies, but it would be unfeasible since...
asked by 23.07.2014 / 23:43
5
answers

Disable a submit and Activate only when the minimum radio buttons is selected

I tried to make a function but it came out with some strange bugs, it has to be more or less this script, but enable button only if 5 or more radio buttons are marked. Remembering that my form is huge, it is a questionnaire that has radio grou...
asked by 27.02.2014 / 18:28
1
answer

submit in form with jquery not working

I have a form and inside this form I have an input of type file. <form id="formulario" method="post" action="upload.php"> <input id="imagem" name="imagem" type="file" class="da-custom-file customfile-input" > </form> an...
asked by 16.06.2014 / 19:19
5
answers

Capturing Enter in IE using jQuery

I have the following code in jQuery: $(document).keypress(function(e) { if(e.which === 13) $('.button_ok').click(); }); When I click the enter key, it causes the user to click on the button of class button_ok . It w...
asked by 01.09.2016 / 16:17
2
answers

How to simulate a jQuery keystroke?

I would like to know if there is any way to simulate keystrokes with jQuery. For example, when you click a button, you simulate that the "down" and "left" keys have been pressed, as if the user had them. $(document).on('click', function ()...
asked by 02.05.2016 / 15:43
3
answers

How to select an option in select using a text using jQuery?

I have <select> created this way: <select id="animal"> <option value="0">Novilha</option> <option value="1">Bezerro</option> <option value="2">Boi</option> </select> T...
asked by 26.01.2017 / 17:00
4
answers

Transform a Normal Array into Multidimensional

I have an array in this format: meuArray = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ...]; I would like to turn it into a multidimensional array with javascript / jquery leaving it like this: meuArray = [ [0] => [...
asked by 24.11.2016 / 12:57
3
answers

Script exchange image every reload

I have 5 banners at home, and I would like every upload from home to display one of the banners. Ex: I visited the site and displays the banner 1 , I browsed some page and came back home displays banner 2 I believe it would work every time I...
asked by 12.08.2015 / 19:20