Questions tagged as 'javascript'

1
answer

Change word when I click

How can I hide the word volver and show it when the div that has the class collapse is opened and the word search is hidden, that is, when the div makes collapse , "this open " show the word return if it i...
asked by 03.11.2017 / 16:02
1
answer

Pass a list of objects from JavaScript to PHP

My code is as follows: function actualizarEstado(){ hi = Object.values(actualizaciones); window.location = ('actualizar.php?actualizaciones='+ hi); } <?php $actualizaciones= $_REQUEST['actualizaciones']; print_r($actualizaciones); ?>...
asked by 10.11.2017 / 16:00
3
answers

How the for ... in statement works in javascript

Good, a question has arisen with the function for...in of javascript, and I do not know if it is because I am using it badly, but it does not work for me. I am trying to apply to several elements of the DOM with querySelectorAll an...
asked by 06.11.2017 / 11:35
3
answers

Select part of the text between symbols

I'm doing a blog. My doubt is, let's suppose that in the paragraph of the article in the blog, I want the words that are between ":" for example, "There was: a: vez", I know that it can be done with javascript, but the only thing I found abou...
asked by 07.09.2016 / 17:19
3
answers

How to improve this jquery line

Good afternoon, I have this line of code, it works perfectly, but I would like to know if there is any way to remove all .parent in some way $(this).parent().parent().parent().parent().find("input").val($(this).text());     
asked by 19.09.2016 / 21:56
2
answers

Hide checkbox in jquery datatables

I have a problem when I want to hide checkbox inside a column of a table with datatables. The problem is that only the checkboxes that are shown in the table are hidden, if for example I am showing 10 rows, only the checkboxes of those 10 row...
asked by 15.07.2016 / 16:20
2
answers

Convert dynamic element into clickeable

I have the following element in my project: Individual code for each box <div class="col-md-3 col-sm-6 col-xs-12"> <div class="info-box bg-aqua"> <span class="info-box-icon"><i class="fa fa...
asked by 18.02.2018 / 19:23
4
answers

How to know which div was clicked without static id?

I want to perform an action when I click on a div, but that div is generated dynamically according to the records of the BD, so its id could always vary. For example:    id="identificador1", id="identificador2", id="identificador3"...
asked by 08.02.2017 / 18:58
2
answers

Problem with JQuery click event

I have this code: var elementos = $("#caja1").children("a.list-group-item"); var elementos2 = $("#caja2").children("a.list-group-item"); function asignarClick(elementos) { for (var i = 0; i < elementos.length; i++) { $(ele...
asked by 25.05.2017 / 15:35
3
answers

Add values from a JSON array

I have this JSON array: [{"amount":"500"},{"amount":"750"},{"amount":"250"}] I have tried to add the values it contains with: $.getJSON('http://api.com..../water.php',function(data_water_tot){ console.log(data_water_tot); $.each(data_wat...
asked by 26.05.2017 / 16:42