Questions tagged as 'javascript'

1
answer

Control the go back of the browser button

I'm using the function in jQuery onbeforeunload but it's being turned on by the browser's Back Button. I would like to know how to control the event back from the browser, I have tried several possible solutions but none worked....
asked by 19.06.2015 / 17:13
1
answer

Lock Mouse Scroll

How do I block the mouse whelo scrolling on a div using JavaScript or jQuery?     
asked by 13.10.2015 / 12:26
3
answers

Send Javascript Array for Controller via POST

I'm trying to send Array of int from JavaScript to Controller via POST . See my array: console.debug(itens); Array [ 1, 2 ] I'm trying to send it as follows: $.post('@Url.Action("MinhaAction", "MeuContro...
asked by 13.10.2015 / 14:50
1
answer

jQuery: how to check if an element is hidden?

How to check if an element is visible or hidden in jQuery? For example, an element can be hidden using .hide() , visible using .show() or switch between hidden / visible with .toggle() .     
asked by 03.05.2015 / 17:51
1
answer

How to put 2 elements concatenated with variable in a selector with jQuery?

I have 2 variables and I want to put the same concatenated ones in just one selector with jQuery: I know you can do this: $(".classe1, .classe2").append(...); But I want to concatenate these two classes with a variable and put the two in...
asked by 02.05.2015 / 22:36
2
answers

Array of elements in string

How to transform this object array from td's localidades = "<td style='white-space: nowrap;'>Sto.amaro</td><td style='white-space: nowrap;'>Osasco</td><td style='white-space: nowrap;'>Lapa</td><td...
asked by 05.05.2015 / 16:47
1
answer

Replace text with HTML when it contains value in the DIV

I have the div's: <div class="mensagem"> <div class="texto-mensagem">:D, :( Olá Mundo!</div> </div> I want the result to print this: <div class="mensagem"> <div class="texto-mensagem"> <d...
asked by 06.05.2015 / 06:03
1
answer

How to navigate a site if a single page?

I want to make one of those one-page sites, but I can not think of one thing: how can I do that when I click a button it scrolls down the page to the referring content? In the menu you have to have a Contact button and when I click on it it g...
asked by 06.05.2015 / 14:26
1
answer

Return from variable in javascript = undefined

Here is the code: <script type="text/javascript"> function Enviar(){ var tempo = document.getElementById('tempo'); var veloc = document.getElementById('veloc'); var distancia = parseInt(tempo) * parseInt(veloc);...
asked by 08.10.2015 / 02:32
1
answer

Pass the data-id="@ milestones.code" to a modal

My system should work as follows: By clicking on the highlighted red button in the image below Itopensthismodalhere: Thisisalreadyhappening,butnowIneedtoclickonthefirstimage,itwilltakedata-id="@milestones.Codigo" and save it in the...
asked by 07.10.2015 / 03:32