Most voted "javascript-events" questions
None
Learn more…279 questions
Sort by count of
-
1
votes1
answer42
viewsFocusin event does not work
I’m trying to use the event focusin in a Event Binding in Angular 4 and it does not return the expected for the event. I added the event to a div and to test just launched a console.log (to see if…
-
1
votes0
answers48
viewsDoubt with Increment + Loop . js
I have this script: var startValue = '0.00000001', stopPercentage = 0.000001, maxWait = 800, stopped = false, stopBefore = 1; var $loButton = $('#double_your_btc_bet_lo_button'), $hiButton =…
-
1
votes1
answer64
viewsJavascript and conditional switch, problems when saving a dynamic value
Well I’m still learning a little bit more about javascript, and I’m using a little bit of jquery lately, this code is one of my most recent works, it’s a code editor. How it works? First, we have a…
-
1
votes1
answer230
viewsHow to run an Alert only once in an Asp.net MVC View
I have a project in Asp.net mvc and in my view has an Alert that runs whenever the page is loaded (it closes automatically). The problem is that every time I make a Submit and the view is reloaded,…
-
1
votes1
answer113
viewsHide Javascript menu
With the code I created I am not able to hide my menu, even closing and opening the burger menu and creating the effect the menu is not hidden. Could you help me and tell me where I’m going wrong?…
-
1
votes1
answer46
viewsInitialize variable
I’m doing an event exercise that consists of typing a name into the input that will be printed below by pressing "send". It is then possible to apply new styles to this text, such as color,…
-
1
votes2
answers153
viewsDetermine CSS property based on a javascript condition
HTML <tr class="linha"> <td class="tipoMov">Receita</td> <td>Corte de cabelo</td> <td>R$20,00</td> </tr> Javascript window.onload = function(){…
-
1
votes0
answers73
views(Javascript) - How can I remove duplicate event occurrence
Good evening guys, I am learning Javascript and decided to create this layout to test some knowledge, created a table and a modal to add users to the table. I’m creating the part of edit users, and…
-
1
votes2
answers66
viewsEvent with onclick
I am styling an input/search field using the onclick of javascript, I can do 50% but the rest I’m cracking my head and I don’t know what to do. I was able to make the text input box to make the…
-
1
votes1
answer36
viewsProblems while removing Row using JS in Asp.net Core MVC
I have a dynamic address registration where the user adds and removes the addresses dynamically. Each Row that is added is inside the "div-addressees". I am unable to remove the Rows ('form-group…
-
1
votes1
answer102
viewsSelect menu when clicking
I would like to create a javascript function that when the user clicks on some menu item it gets active, I did some research on the internet but could not play in my code. <nav…
-
1
votes1
answer45
viewsCreate style for various dynamically generated elements
I have the following function, which creates blocks dynamically: function criar(){ let box = document.querySelector('.box'); box.style.display = 'flex' let element = document.createElement('div')…
-
1
votes2
answers79
viewsChanging the color of HTML Elements that do not yet exist
I need the backgroundcolor of div elements to be changed when passing the mouse over, but these elements do not exist yet, will be created by pressing a button, I’ve tried for a few hours to think…
-
1
votes1
answer109
viewsCreate a variable with the input value and addeventlistener "keypress"
Guys, I’m trying to get the isolated value of some inputs when typed in the input. I can even log in the entered value. eg: console.log(topLeft.value), which returns the value that is present in the…
-
1
votes2
answers195
viewsManipulating CSS Property with Javascript
I need to insert a WIDTH worthwhile 140px in the following CSS class: #menu_global2 ul li .icon_menuG The intention is to read the size of my width #menu_global2 and then apply changes to the CSS. I…
-
1
votes1
answer50
viewsStart an event and stop when you click again - chromeExtension
I’m creating a very simple extension in Chrome for Whatsapp Web to speed up the audio by 1.5x, but so far I’ve only been able to make the function run, and it keeps running until the page is…
-
1
votes3
answers55
viewsHow to use mouse events to create enter/out effect without the German inside the selected element interfering
I wanted the div with class block was with an outline when I entered with the mouse inside the div and then the border disappeared when I take the mouse out. Problem, when I pass the mouse over the…
-
1
votes1
answer81
viewsHow to make several elements participate in Event Listener?
I created a card page and added a Fontawesome icon to each one. However, when I try to make this action repeat on the other cards, it doesn’t work. When I click on any other card, only the first one…
-
1
votes1
answer25
viewsProblem when inserting new row in table
I need to include new rows in this table with their respective columns: <div class="tasks-group-new-area"> <input class="input-task" type="text" placeholder="Add Task"> <button…
-
1
votes1
answer37
viewscalculate the direction of touch (top || right || bottom || left)
To move the tail in this game https://leonardovita.github.io/javascript-snake-game/ using the touch screen of the mobile phone, need to calculate the position of the click on the screen, as in the…
-
1
votes0
answers15
viewsReset Setinterval in Picture Carousel when pressing button does not work(carousel with automatic and manual feed)
const slides = document.querySelectorAll('[data-js="carousel__item"]') const nextButton = document.querySelector('[data-js="carousel__button--next"]') const prevButton =…
-
1
votes1
answer30
viewsVS Code does not recognize methods of the Event object
My VS Code does not recognize the methods and parameters of the Event object when it is sent by an anonymous function as a parameter of another function. In this case you see it working. This one…
-
0
votes1
answer678
viewssetInterval how to come back again after giving a clearInterval?
for reasons of study and knowledge, how could I clear a setInterval and then according to some event I can continue its execution again. 'use strict'; var imgAtual = 0; var arrImg =…
-
0
votes1
answer1206
viewsCode for tab / window / browser tab flash
Good afternoon, as I am not good at javascript, so I need the masters here to help me. I am building a browser system for a company. In this system will happen several events, and as I wrote in the…
-
0
votes0
answers389
viewsTypeerror: Cannot read Property '1' of Undefined
Good morning, I need your help. I am receiving data from the serial port "/dev/ttyUSB0", my goal" is to recover some information ( temperature and humidity ) and replace in the object…
-
0
votes0
answers401
viewsJavascript Focus() does not work on a particular code snippet
In this code I use several times the event Focus(), however in a certain stretch it is ignored, I would like to know why? The line that does not work is commented. function CriaRequest() { try{…
-
0
votes1
answer673
viewsScript to take page data in Php or python
I want to implement a script that accesses the printer page here of my work and take the data as for example, number of impressions, user names, basically I want to create a control system. Where I…
-
0
votes1
answer35
viewsDetect slide position in Jquery SLY plugin
Hello. I wonder how I detect the current position of a slide using the Sly plugin. The kind I use is 'oneperframe'. I don’t have much knowledge of jquery, and even less with this plugin. I visited…
-
0
votes1
answer175
viewsDiv display only after full upload of the same (Preloader)
Hello, everybody! I don’t know anything about javascript, but I would like to change this js code so that the contents of a particular div only appear after loading it and not after loading the…
-
0
votes1
answer41
viewsJavascript generated link does not work
I have tried several ways to create a way to remove the animated menu I created. Via function, link, getElementById, etc. But any link generated by JS crashes. Code below. I’ve fixed errors by…
javascript-eventsasked 7 years, 10 months ago Paulo Sérgio Duff 1,201 -
0
votes2
answers1098
viewsRun automatic click on form input
I have a search form, and it lists details. when accessing the details it saves session, but when returning the list saves the query in the session but does not execute the query. What I thought is…
-
0
votes1
answer526
viewsHow to create a Video Game style scroll horizontal menu?
I’m trying to create a menu with the following features: Horizontal with scroll Running via mobile touch/scroll. Leave the mid div option selected, with a Javascript/Jquery event (or a div inside a…
-
0
votes1
answer83
viewsHow and why does getElementById not perform on page loading?
Business problem: I’ll create a system that will run on a server-less platform. It can be a local administration area interface (a client for a service), or a mobile app. The application will load…
-
0
votes1
answer86
viewsJavascript sub-functions
How do I create sub-calls in Javascript functions? Below follows example of usage, my doubt is how to create a Function of this type. Depending on what happens within the "Travel" routine, a call to…
-
0
votes1
answer661
viewsFunction to open the full screen (Fullscreen) at angular 2
I’m needing q my screen opens full ... When I give an ng Serves the application when running it comes with a fullscreen. Can someone give me a tip on how to do this ?
-
0
votes2
answers46
viewsElement problem with char and number
I’m not being able to do mathematical operations with this function, obviously because there are char elements inside. var centesimas = 0; function inicio() { control = setInterval(cronometro, 10);…
-
0
votes1
answer33
viewseffect on attr. ('Javascript style
I need to run this 'Grayscale' filter gradually, which will apply gradually over a period of time. $('#backstatic').attr('style', 'filter: grayscale(100%)'); this is my line, I wonder if you have…
-
0
votes0
answers32
viewsJquery does not work with new HTML elements
I have an HTML form with several elements (inputs text, range, image, etc). When I click a button other elements are added dynamically, but in these new elements, jquery events do not work (onclick,…
-
0
votes1
answer649
viewsChange a JS Function to open two different Modal Bootstrap Windows - Asp.Net Core MVC
Currently, I have a Modal (modalGenerica) in my Index that opens the Create, Edit and Delete views in a generic way. To open the Create and Edit views, there is no problem, as both open in a modal…
-
0
votes1
answer343
viewsDuplicate <div> without duplicating Javascript
I need the following help: I managed to join two codes I found on the internet, and edited the formatting to my liking. I have a gallery with images and overflow horizontal, my code works, but I…
-
0
votes1
answer36
viewsHeader collapse with pure javascript
I would like to make a header that when scrolling down, it compresses its content. I have the following script so far. window.scroll(function() { var scroll = window.scrollTop(); var element =…
-
0
votes1
answer199
viewsTouch/click and drag effect
I have a gallery with horizontal scroll, I wonder if it is possible to put a click and drag to move the scroll, as if it were a touch dragging with the mouse. Obs: the images will have link. my…
-
0
votes1
answer356
viewsHow to handle DIV with angular 2
I have 2 Divs and would like to manipulate them with buttons. I have 2 Divs. When one appears the other is hidden, vice versa. Can someone help me ? My version of Angular is 5. Function1 Function2…
-
0
votes0
answers46
viewsRedirect between pages
Next, I have two html pages in the expense release system. One page is called.html releases and the other is called.html records. The first page is where I’ll post the expenses and the second is…
-
0
votes1
answer77
viewsHow to block Scroll Javascript function on different screen widths
I am with this script, it has the function to make a menu appear when there is some kind of scrolling on the page, however I would like that from a certain width of page this script was not…
-
0
votes1
answer195
viewsMove image while hovering over it
I’d like to help with a study I’m doing. How can I move an image, randomly and dynamically, by passing the mouse on it? I would like a line of reasoning to come up with a solution in my future…
-
0
votes1
answer269
viewsSave text from one TEXTAREA with button and print to another div
How I save a text from a Textarea in a variable with a click on a button, and then print that text by clicking another button on another textarea?
-
0
votes2
answers143
viewsInput event only happening when loading the page
Hello, folks at Stackoverflow. I try to make a textarea of a web page I am developing continuously check whether the typed text is the same or different from a predefined phrase, according to the…
-
0
votes1
answer92
viewsChange background according to Javascript temperature
I did a Freecodecamp project where it’s to make a Weather Local (Local Weather). I used their own project API, already ready, but it does not change the background. I want to change the background…
-
0
votes3
answers576
viewsHow to get the ID value of a button?
In the ID there is a dynamic value, so I would like to get that value without just clicking map the button and store in a var: <button name="edit" id="valor_dinamico">Edit</button>…