Questions tagged as 'javascript'

3
answers

Set JS to calculate the size of a div

I made a one-page site and to calculate the size of the main divs I used this JS: function tamanhos(){ $('#a, #b, #c, #d').css('min-height', $(window).height()); } $(window).load(tamanhos); $(window).resize(tamanhos);...
asked by 08.05.2015 / 16:09
1
answer

Redirect to another page

Colleagues. How would I make the user to close the browser or tab, was directed to another page, but that did not work when giving the F5. I say this because I have a system that has the status online and offline and many of them are closing...
asked by 13.05.2015 / 01:24
2
answers

Auto Click mouse on a content within a div?

I would like to know if it is possible to do a div with auto click. This is how the page loads and when someone clicks anywhere on the page the mouse clicks on the content inside the div. In case I put an iframe from an external page. but...
asked by 29.05.2015 / 22:04
3
answers

Problems displaying javascript string

I have the following code: $(function(){ var curso = controller.getNomeCurso(); $("#curso").text(curso); }); The problem is in the line 18 because I can not display values with special characters correctly. Example: When sendin...
asked by 01.06.2015 / 22:17
2
answers

Jquery - hover () and mouseleave ()

I have a problem. I have two divs with a certain distance between them. I would like that when I position the mouse in the first div, the second div appears and I can move the mouse from one to the other without the second div disappearing. O...
asked by 02.06.2015 / 21:46
1
answer

Show and hide Div with Java Script

The code below is to show and hide the contents of a div . I'm trying to use it to show some videos, but I can not make it show more than 2 videos. See the code: Html <button id="opt1">Option 1</button> <button...
asked by 11.06.2015 / 23:50
2
answers

replace javascript

Hello, I want to hide a text that contains "(numbers)", get a method, but only works on the first element, the others still showing, how to loop for all elements? follow my code <div id="mydiv"> <a href="#" id="demo"> Mr Blue ha...
asked by 11.06.2015 / 18:58
2
answers

Decrease the precision of the float in Javascript?

How to decrease the decimal places of a float number in javascript? For example, I want 3.3333333333 to become 3.34 . What is the simplest way to do this in javascript ? I've tried functions like Math.ceil , but...
asked by 09.06.2015 / 19:34
1
answer

Sending a form just by clicking on the radio button

My question is this: Look at the following form fields: input type="radio" name="pagto" value="A" input type="radio" name="pagto" value="B" input type="radio" name="pagto" value="C" input type="radio" name="pagto" value="D" Note that the "n...
asked by 13.06.2015 / 21:58
2
answers

SetInterval () and load () functions and traffic problems

So guys .. I know the code below is pretty unnecessary, but I just need to know one thing, actually an answer ... The code below in my site serves to make refresh in an update icon that shows the number of notifications in case any friend...
asked by 18.06.2015 / 15:18