Questions tagged as 'javascript'

2
answers

How do I place the optgroup text before the option when selecting it with select2?

What I intend to do is that when selecting one of the options, put the parent text (optgroup) and show me something like " LG / Lg - Test 1 " (notece in the example that I say that "LG" is the parent (optgroup) and "Lg - Test 1" is the child (op...
asked by 09.05.2017 / 20:56
2
answers

Make an Image "run away" from another

I must say first that everything, that I am a newbie , I am recycling myself on programming issues. Even being a programmer for more than 6 years I did not play anything. So I implore you patience. I am practicing things with JavaScript...
asked by 09.04.2017 / 13:06
2
answers

Animation goes with Class but not with Id

The question is: Why THIS example goes like this, but if the JS changed it to the following one, stop walking: var clicked = 0; $(".ripple").click(function() { var clicked = 1; document.getElementById("di").addClass("expanded"); });     
asked by 27.10.2017 / 20:58
2
answers

obtain value of row of selected checks

I have an html table and in each record I put a checkbox How could I do so that when I select some records with the checkbox I get the data of the row to send them through a form? $(document).ready(function(){ $("input[type=checkbox]:ch...
asked by 01.08.2016 / 18:14
2
answers

Select tr of a table with javaScript if it has a text

I am trying to change the style of an entire specific row if, within that row, an element contains a plain text that I receive through a parameter in the url. With this code I extract the variable hidden in the url. var query = window.locat...
asked by 16.08.2016 / 00:43
5
answers

Execute $ .ajax within a cycle

I have a problem with the following code, I want to execute within a cycle for a call $.ajax until the exit condition of the cycle is fulfilled, however the cycle does all its iterations and in the final iteration run the ajax...
asked by 05.01.2017 / 21:33
2
answers

Go to another controller from javascript

I want to redirect from a view to a controller that is a higher level, for that I use @url.action in this way miUrl = '@Url.Action("CambiarEstadoVisita", "~/Areas/Visitas/Visita")'; But the link it generates is this: http://localho...
asked by 24.08.2016 / 10:23
2
answers

Give different numerical format with JavaScript

Is it possible to perform the number format that is done in php but in javascript? I found that it could be with valor.toFixed(); but it does not. Does anyone know another way to do it? Something like 46786.62 convert it to 46,7...
asked by 12.08.2016 / 19:23
2
answers

jQuery simulate a continue in a $ .each for

If I have the following code Arreglo.each(function() { if(micondicion) return false; } Exits the cycle, How can I continue with the next one?     
asked by 29.12.2015 / 17:30
1
answer

How to replace contents of an array with elements of another array JQUERY

I have a question about whether it is possible, and if it is possible, how can you replace content in an array, by the content of another array. For example: Input: "blue red and green" find = ["azul", "rojo", "verde", "y"] replace...
asked by 19.03.2018 / 19:38