Questions tagged as 'jquery'

1
answer

loading screen only when needed

I made a loading screen so I would like to make it work only when it is a time-consuming action and not with any loading. JQUERY <script type="text/javascript"> $(window).load(function() { $(".loader").fadeOut("slow"); }); <...
asked by 18.07.2017 / 16:44
3
answers

Simplify mouseenter and mouseleave of multiple images

I have a top menu made up of images and I would like to move all the other images except the selected one to decrease the opacity. But my code gets too big, I wish I could slow down for easier reading and interpretation. There are 9 images in to...
asked by 04.08.2014 / 20:57
4
answers

Sort divs by date in the format dd / mm / yyyy

Does anyone know how I can sort a set of divs by a date present in their content? For example: <div class="box" id="box1"> <div class="date">01/05/2018</div> </div> <div class="box" id="box2"> <div...
asked by 19.04.2018 / 19:13
3
answers

How to use fixed position inside a div?

I have a div that has its header and its content that has height fixed and it has scroll . How to put position: fixed in header (where is the title), without moving it when scroll goes with the page? Example:...
asked by 16.05.2014 / 15:08
5
answers

What does it mean? and: within an expression? [duplicate]

I saw on a website the following code: var campo1 = document.getElementById('valor1').value; var campo2 = document.getElementById('valor2').value; var maior = (parseFloat(campo1) > parseFloat(campo2) ? campo1 : campo2); var menor = (pars...
asked by 25.03.2014 / 21:34
3
answers

Do the Bootstrap dropdown close when clicking another dropdown in the same menu?

The menu must remain open while I click anywhere on the document or screen, but when I click on the dropdown of a second menu, it should close the previous menu, and also need to open and close by clicking the dropdown. My bootstrap code:...
asked by 14.04.2016 / 14:30
1
answer

How to get the values from a table?

My question is pretty basic: I have a table , I need to store in a variable all values of the line that was clicked, I'm trying this with this method below but the result is "undefined". What could be wrong with the code? Or how coul...
asked by 14.02.2016 / 19:10
1
answer

Adding and Removing Fields Generated via CakePHP

I have a <select> that is fed by data from the database. I need to manipulate this select and multiply it if the user wants to enter more different data. I also need to change the "name" attribute of each <select> so...
asked by 12.02.2015 / 15:45
1
answer

I would like to change an attribute of a dynamic element with jquery

I have the following code that I thought would work, but nothing happens ... $(document).on('click', '#tab-departamentos a', function(){ $('textarea').each(function(){ var a = (this.scrollHeight-12)/20; //alert(a); $(this).attr...
asked by 06.02.2015 / 15:52
5
answers

Change divs with the same class

<table> <tr> <td class="valor"> 33</td> <td class="valor"> 88</td> <td class="valor"> 55</td> <td class="valor"> 36</td> <td class="valor"&...
asked by 19.10.2016 / 16:05