Questions tagged as 'javascript'

3
answers

Function that returns the position of the smallest number in a vector

Simple ... I need to know the position of a value (the smallest value) within a vector, to find out the smallest value I'm using Math.min() but to print the result I need to know in which position the value is in the vector. It could be...
asked by 10.11.2016 / 19:08
2
answers

Display Div with specific content when clicking on link

Good morning, I'm creating this topic because I performed a search in the forum and found this solution here. Opening a < div > when you click on a < a >? link But I need a more specific solution. I am developing a questio...
asked by 09.11.2016 / 16:26
1
answer

Error comparing two strings with float value

Good afternoon! I am trying to compare numbers with Jquery, they are values with decimals or not. when the value goes up to 999 everything works perfectly, but above that it does not work as it should. Example: value_mo_contract = 510.00...
asked by 20.03.2017 / 18:07
2
answers

Element Problem with char and number

I'm not able to do math operations with this function, obviously because it has char type elements inside. var centesimas = 0; function inicio() { control = setInterval(cronometro, 10); document.getElementById("inicio").disabled =...
asked by 17.03.2017 / 18:57
1
answer

I always want to delete the first index with each click of a button. How do I do?

Given what I've tried: <html> <body> <script> var nome = ['1', '2', '3', '4', '5', '6', '7', '8', '9']; var remover = nome.slice(0); function shuffle(array) { return (Math.round(Math.random()) - 1);...
asked by 18.03.2017 / 16:50
1
answer

Problems in nth child

I have the code below, it's working perfectly, the only problem is that if I add one more or a few li it changes its formatting. I wish it would stay the same now, except regardless of how many LIs exist. I would like the background to be the sa...
asked by 22.06.2016 / 16:44
1
answer

Automatically center Google Map between two bookmarks

I'm having difficulty trying to center the map between two markers. I need to do this when I change the DirectionsRenderer from one map to another. If the route has no changes that can be dragged then the map will automatically center. Bu...
asked by 22.06.2016 / 17:37
1
answer

Sort a list ul by the attribute "value" of the li?

Speak, all right? So I have a problem ... I have a "sort by" button, in this case, higher price and lower price. What I need to do is sort the elements of a <li> list by its value attribute. For example: <li value="200">...
asked by 04.06.2016 / 03:59
1
answer

Upload applet via javascript

I have a java web start project (a applet more precisely) and want run (display applet ) with javascript . In Chrome there is a way to run the applet, but you need to click the link. I want a function (it can be jquery...
asked by 30.05.2016 / 21:33
1
answer

Error fetching JSON from a text - JQUERY

I'm retrieving a json from a text, however, the following error occurs: XMLHttpRequest cannot load http://www.vagas.com.br/vagas/feeds.js?q=engenheiro. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin...
asked by 07.06.2016 / 20:19