Questions tagged as 'javascript'

1
answer

Timeline Google Chart, add slider / picker

Is there a way to insert a picker or slider to capture the time? Example: I should update parameters from the date selected with the picker. google.charts.load('current', { callback: function () { var dataTable = new google....
asked by 27.11.2017 / 16:10
3
answers

What does '' this '' mean when we are working with objects in javascript?

This is an example of my doubt, why put "this" at the beginning instead of just putting "wheels = 4" or "seats = 1", etc. How can this help me when programming? var Car = function() { this.wheels = 4; this.seats = 1; this.engines = 1; };...
asked by 25.06.2016 / 05:23
1
answer

Add borders to words in regular expressions

I want to have in Javascript a function that uses regular expressions to add things to the edges of certain words in a text. Example, I want to replace this:    The swift Indian bat ate happy cardillo and kiwi. The stork played the saxop...
asked by 25.03.2017 / 00:12
4
answers

Find variables in a document

var a1 = setTimeout(function(){}); var a2 = setTimeout(function(){}); var a3 = setTimeout(function(){}); var a4 = setTimeout(function(){}); var a5 = setTimeout(function(){}); if(){ clearInterval(a1); clearInterval(a2); // etc.. }...
asked by 05.09.2017 / 18:10
2
answers

What is the difference between success and done?

Well I have a line of code in ajax which I do not know if it's better to use success or done I do not understand the difference between these terms but in the end the 2 do the same or I misunderstand the concept. $('#main for...
asked by 31.08.2017 / 17:14
5
answers

Validate a date dd / mm / yyyy with regular expressions

The file% co_of% validation date JS fails if you put as days 10 and 20. The code is this: function validaEdat(){ vesSumant(); vfalladata = false; //Comprovació de la data de naixement i el correu electrònic var vregexN...
asked by 31.03.2017 / 16:40
4
answers

Get URL where I'm located with JavaScript

How do I get the URL current on the website? using javascript . What I want is to know if I can get the url of a website, but for example if I'm in the /conocenos section you want to get http://sitioWeb/conocenos...
asked by 02.02.2016 / 18:25
1
answer

Replace an html tag with jquery

When initially the website opens, a bootstrap modal appears asking to filter date. The date is filtered (example: April 2016). Click on the ACCEPT button and the magic happens, the server throws me the data to fill a whole dashboard from head...
asked by 29.09.2016 / 17:42
4
answers

Change color of HTML elements when holding down the mouse

I am trying to change the color of the elements, changing their class, while the mouse is held down, giving the effect of "painting". Doing it by mouse clicks I have it, here I leave the code: $(() => { $('table').on("click", "td...
asked by 28.02.2018 / 17:29
2
answers

Points and commas in JS, Recommended at performance level?

I know that the use of; in JS, but for the JS interpreter that is more efficient, what do we say or not?     
asked by 15.03.2018 / 14:35