Questions tagged as 'javascript'

1
answer

animation on the main page

It includes a start animation of my project (example "welcome") and then go to the main home, but in case it gets 2 together ... Is it possible?     
asked by 10.04.2018 / 04:28
1
answer

How to close JS menu by clicking the link?

So, I'm trying to make a mobile / pc menu, that by clicking the icon it occupies the whole screen, and when scrolling the page and it goes together .. And for that, I used some fixed functions in css, so far it's okay. Only when I use the fixed...
asked by 20.05.2018 / 08:04
0
answers

How to solve or reject a (native) Javascript Promise outside your scope?

Most of the implementations I see from promises in Javascript frameworks treat the use of Promises so that it is possible to access the functions responsible for Rejection and Resolution in any scope. For example, Angular: var defer = $q();...
asked by 22.05.2018 / 17:20
2
answers

How to get X and Y from Canvas Click

I would like to get X and Y from a click on my canvas. var canvas;//o elemento canvas sobre o qual desenharemos var ctx;//o "contexto" da canvas que será utilizado (2D ou 3D) var dx = 5;//a tava de variação (velocidade) horizontal do obj...
asked by 20.05.2018 / 02:00
1
answer

Upload image without page reload

Good evening, I'm uploading file, it's working but every time I upload the file the page refreshes, could anyone give a hint how to solve this? I'm using angular 5. component.ts OnSubmit(){ const formData = new FormData(); const...
asked by 19.05.2018 / 02:00
0
answers

Google Maps behavior on mobile devices

Hi I'm developing a project in which a page will be just the map. I need something like this: Butwhenit'sonmobiledevices,Idonotwantittogiveyoutheoptiontoscrollwithtwofingers.Iwanttheusertonavigatenormally,ifIhadopenedgooglemapsonmyphone.I...
asked by 31.01.2018 / 18:40
0
answers

Is not Firebase allowed to use get and set in query information?

I'm trying to use the get and set methods with javascript in the firebase querys .. It does not allow me to use get () because it does not access the array and gets error or lenght 0. Why does this happen and how should it be done? Samp...
asked by 05.01.2018 / 14:35
1
answer

My js function does not want to stop

verificaseTemDado does not want to stop when I give clearInterval to success $('.arquivo').on('click',function() { setInterval(verificaSeTemDado,1000); }); function verificaSeTemDado() { verifica = $('.arquivo').v...
asked by 31.12.2017 / 04:21
0
answers

How to load data from the selected item?

Context: Home How to load data from a selected template? Is JavaScript required? If so, should the code be in an external file or in the same code? HomeWhenthetemplateisselected,thetemplateitemsmustbeloaded.Asshowninthefollowingimage. Code...
asked by 05.10.2018 / 22:21
0
answers

Control order of image load events

I need to load some images through the input file. So far so good. However, I need these images to be loaded in order. But when I put img.onload = function () {} inside of for, the order of variable i, becomes completely different, so the ima...
asked by 09.10.2018 / 22:42