Questions tagged as 'javascript'

2
answers

Go through each index of the indexed array, and from each index extract the preset user with JQuery

Good! It's my first year studying javascript, I have a task that I need to make a kind of order pages, to make things easier for us, the teacher asked us to add users directly to clients and officials (two types of users) in associative arrays a...
asked by 05.07.2017 / 13:21
1
answer

Configure Babel in my work team

I am trying to follow some tutorials to learn the improvements and changes that ES6 brings, but I have taken this with the use of a transpiler, in this case, Babel.js. On the Babel page now to install it, they recommend, for the CLI , t...
asked by 05.07.2017 / 03:50
1
answer

Why does the Google Maps API not work on a server? [Error: The Geolocation service failed]

Currently I just upload what I have from my website to a test server and it is free, locally if the api of google maps works and shows me the location where I am currently. But when I uploaded my website to the server and modified...
asked by 20.07.2017 / 05:10
1
answer

Error Uncaught TypeError: Can not read property '1' of undefined [closed]

I get the error:    Uncaught TypeError: Can not read property '1' of undefined           at Object.success (Index.html: 60)           at c (jquery.min.js: 3)           at Object.fireWith [as resolveWith] (jquery.min.js: 3)           at k...
asked by 31.05.2017 / 22:35
1
answer

How do I use Masonry horizontally?

I have the following code .grid{ column-count: 2; column-gap: 1em; } .grid-item{ margin: 10px; background-color: #333; display: inline-block; margin: 0 0 1em; width: 100%; } .grid-item:nth-child...
asked by 03.07.2017 / 00:01
3
answers

Clone a table and clone text fields within it

I have a problem when cloning a complete table in JavaScript: pressing the button that allows me to clone the table deactivates me the buttons that allow me to clone text fields inside it; and vice versa: if I press the buttons inside the table...
asked by 03.07.2017 / 17:23
1
answer

I can not insert a cell with JavaScript (insertCell is not a function)

What I want is that when I click on an image I insert a new cell with some data in the table. The problem is that it tells me that insertCell is not a function (in the browser's console) and I do not know why, I'm doing it as I see tha...
asked by 14.06.2017 / 07:29
3
answers

Apply events with Javascript to elements of a class

I have a silly query maybe but I can not figure out how to do it, I want to do this same but with Javascript pure: $('.clase').click(function(){ $(this).toggleClass('activo'); }); What I can not do with pure Javascript is to apply th...
asked by 19.05.2017 / 16:27
1
answer

Print PHP variables in different places in html

I'm validating an html form with php and ajax. When there is an error, such as blank spaces, ajax prints the value of the variables that show those error messages. The problem is that currently all the variables are printed in a single string...
asked by 24.07.2017 / 16:43
1
answer

update select field using ajax

I'm starting to use codeigniter, javascript with the jquery library and I have the following problem, I have a form and in the select field where I load the cities I send the data from my controller in json, from the sgt form. function L...
asked by 12.05.2017 / 19:16