Questions tagged as 'javascript'

1
answer

Change the color of a box in the hover state of a snip1281 CSS

I'm making a model and I'm using snip1281 that have an effect on the hover, each image or race has a hover effect of a top line with color and a box with the same color on a white text, but all the races have a different color that each box in i...
asked by 06.07.2018 / 20:11
2
answers

Convert thousands and decimals with Regular expression

I need your help because I have a regular expression to convert a number to millles and decimals, but when I put more than three decimal places it also formats decimals, how could it be removed ...? function milesNumeros(numero) { return n...
asked by 06.12.2016 / 22:53
1
answer

prevent repetition of the key pressed long time

How can you keep it from repeating the pressed key? that is to say that when a key is typed it only has to be written only once     
asked by 21.12.2016 / 04:52
4
answers

Reuse a JS function

Hello with the following line of code, how do I modify it and print the amount of each type of fruit using the same function? var fruits = ["Banana", "Orange", "Apple", "Mango","Orange", "Orange", "Apple", "Mango"]; var cant = fruits.filter(...
asked by 30.07.2018 / 21:29
2
answers

Fill a html select by means of a javascript cycle

I want to fill a select dynamically with years, starting from the year 2000 to 2050, through a for javascript. But the code still does not work for me. HTML <select id="año"> </select> JAVASCRIPT select = document.getElemen...
asked by 02.08.2018 / 23:33
2
answers

Log in and send data with GAS

I am working with a code that should validate a user and open a form with filtered data for that user. To open the form after validating, use a dynamic method that was published here and works well for me: var rutaWeb = ScriptApp.getService()....
asked by 15.03.2018 / 06:05
1
answer

Problem with openlayers and coordinates

I have a problem with the openlayers library and it reads the coordinates backwards from my geojson . My geojson has for example: [-5.67063958389914,43.52764170586536] And openlayers read them like this: [43.52764170...
asked by 21.03.2018 / 11:36
3
answers

Store in a variable a data of the option marked in a select to then show it dynamically

I have a select where I complete the options with the data of the products that I have stored in my bbdd. The code is as follows: <select name="p1" id="select1" required /> <option selected="true" disabled="disabled">Elige...
asked by 25.03.2018 / 15:23
3
answers

Simplify a Javascript Switch

I have the following code: switch (az) { case 0: var azul = "Nivel de Riesgo: [0] Sin Riesgo"; break; case 1: var azul = "Nivel de Riesgo: [1] Poco Peligroso"; break; case 2: var azul = "Nivel de...
asked by 21.03.2018 / 03:46
3
answers

How to make my function only affect the element that is being clicked

I have this function, but when it is executed it is applied to all the elements and since I am using its css style reference to grasp the elements, all are painted and not only the one that is clicked $('.vermas').click(function(){ $('.e...
asked by 28.03.2018 / 02:29