Questions tagged as 'javascript'

1
answer

How to check the time of a video

I would like help with a problem. I need to check the total time of a video embedded in a website and the video time that was watched. Would anyone have given me a north to be taken? Thanks!     
asked by 09.04.2018 / 21:07
2
answers

Get data-attribute of a selected option when clicking button

I wished that by clicking the button I would be able to pull value and data-dado of the selected option. I tried the code below, but it did not work: $("#botaoexemplo").on("click", function() { var valor = $('#exemplo...
asked by 09.04.2018 / 21:58
1
answer

Web chart with C #

Does anyone know of an open source tool for generating graphics with C # (MVC)? They will be online graphics and bars.     
asked by 06.04.2018 / 20:15
1
answer

Why, when I compare 1000 and 500, is 500 always greater in this function in JS?

I wrote this function in JavaScript that compares two numbers and tells me which one is the largest: function verificarMaiorNumero(x,y){ if (primeiroNumero > segundoNumero){ return primeiroNumero + " é maior"; }else{...
asked by 13.03.2018 / 04:18
2
answers

Autocomplete JQuery 1.9.1

I have an application using JQuery 1.9.1 (uses the old version because it has functions in the menu that only work in this version), I am trying to autocomplete, but it is giving error $(...).autocomplete is not a function Does anyone k...
asked by 06.03.2018 / 12:45
2
answers

Detect click on the same dynamic and non-dynamic item

When I click on the item, the function changes the class of this item so that it can be detected by the other function when clicking. The problem is that when I use .click , click is normally detected, but when I click again (alread...
asked by 08.03.2018 / 23:05
2
answers

variable catch certain numbers

Good afternoon guys. I need a variable to always get a certain number from an order, for example: user types 123456789    Variable to : Always pick the first number in the string, that is, 1       Variable b : Always ta...
asked by 19.03.2018 / 16:58
2
answers

Send array to PHP via Ajax

I want to send a vector from javascript to PHP. I have the following code but it is not working. How to do it? info = []; info[0] = 'thiago'; info[1] = 'carlos'; alert(info[0]); $.ajax({ type: "GET", data:...
asked by 06.03.2018 / 20:01
2
answers

Encrypt variables in URL

With @dvd solution, we pass variables to the URL via a select: link There are several that look like this when they are passed: example.com/?fundo=img&cor=red What I would like to do now is: encrypt the variable and its value in th...
asked by 04.03.2018 / 19:11
2
answers

Create character pattern as in a CPF - Javascript

What I want to do is: type a CPF without points or dash and then add the dots and dash with JS, create a pattern. Example: I write 99999999999 and the system returns me 999.999.999-99. How do I do this in pure Javascript?     
asked by 17.02.2018 / 21:21