Questions tagged as 'jquery'

2
answers

How to change the color of a parent div relative to the size of the childs

I have div parent and 4 div's child and would like to change the color of border of div parent relative to div child size. To exclarge better put below an image with an example of what I speak. Thepinkandre...
asked by 03.10.2017 / 13:15
1
answer

generate json within loop

I need some help: I have the following json var jsonString = "{ \"0%\" : { \"margin-left\":\"-0%\"},"; jsonString += " \"25%\" : { \"margin-left\":\"-0%\"},"; jsonString += " \"30%\" : { \"margin-left\":\"-100%\"},"; jsonString...
asked by 29.10.2017 / 21:38
1
answer

Subsetting the row of the PivotTable

In the pick line function I get the line clicked and send the data to the form and store OBJ of the line and get index tbm var index = $(obj).closest('tr').find('td').eq('0').text(); Here after I changed the data I create the tr and step th...
asked by 31.10.2017 / 14:02
1
answer

Working with trtd to optimize JQuery

I want to study more about <table> <tr> <td> etc, to optimize my projects. Example: I have 4 <tr> with 2 <td> each, when applying a formula in jQuery for example, that adds the fir...
asked by 29.10.2017 / 02:39
3
answers

Make appear and disappear html class by js

I have a registration page, and when the data is entered wrong, a alert(); appears informing the error, but I would like it to be an error message, just below the fields. I put a span with an error message and with the class sr-only...
asked by 06.12.2017 / 16:57
1
answer

When scrolling the page and arriving at a certain DIV the background color of the same one changed

I would like when someone scrolls the page and arrive at a certain DIV the background color of the same changed I tried to do so: JsFiddle But it did not work. What would be the right way to do it? Note: The site will be responsive so...
asked by 08.01.2018 / 16:28
1
answer

Change image when clicking, when you click again return the initial image

I need to change the icon every time I click and hold that other icon until clicking again, then it goes back to the initial icon. How to do this? Below is the code I am using to create this menu. The part that calls the icon is <span clas...
asked by 26.01.2018 / 15:01
1
answer

Event delegation only once, in a 'dynamic' scenario

I have a function hello() whose argument is the return of an ajax call: function hello(msg) { alert(msg); } $.ajax({ url: 'example.com', data: data }).done(function(resp) { // abre_modal // apenas no fecho (clic...
asked by 17.08.2017 / 17:16
1
answer

jQuery does not recognize .click event of a class added with append [duplicate]

Folks, I can not get the .click event of a button that is added with the append command to work. Here is the function that contains append: function mostrarUploads(nome, tabela) { var $table = $(tabela); $table.html("");...
asked by 08.11.2017 / 13:54
1
answer

Validating input type dates with jquery

The code below for date comparison works for condition if >= and else. function validaDatas(){ var dataInicial = new Date($("input[name='datainicial']").val()); var dataFinal = new Date($("input[name='datafinal']").val(...
asked by 23.08.2017 / 20:57