Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 139833 articles
Browse latest View live
↧

How to have two different text elements moving randomly on a page in Javascript

So I've been reading this post which I found is the closest to what I want. Basically, I want two different text elements (two different words) moving around the page randomly and also bouncing off...

View Article


How do I synchronously run code after a setTimeout() is run?

I need the event.target.innerHTML = FULL_HEART event.target.setAttribute('class', 'like-glyph activated-heart') after the displayError() setTimeout interval is completed in the scenario that the...

View Article


Testing asynchronous componentDidMount that changes state with Jest and Enzyme

All I am doing in my code is upon componentDidMount being run, I am making an axios get request to GitHub, and setting some data back onto state. However, when I run the test it still says the state is...

View Article

Google Sheets function to count number of cells in column [closed]

In my current job, I am doing a project that requires me to reach out to 80+ countries for tax requirements (via distributing questionnaires) which we are then turning into logic for a system...

View Article

In a Chrome extension, why does a closed tab still exist when the callback...

If I pass a callback to chrome.tabs.remove(), I'd expect the callback to be called once the tab has been removed from the UI and and the current Chrome state. In other words, if I run the following...

View Article


Is there a way to add an input field with a default value that a user can...

I'm looking for the capability to allow a user to change text on a page dynamically, but I haven't found anything relating to what I'm looking for.Does anyone know of a way to add this functionality?...

View Article

I cannot get input to work under google app script

I'm writing a web app under google sheets and can't get an input field to work. What am I doing wrong? everything works but uname is always empty (not undefined).edit: I'm adding the full code after...

View Article

troubles using my splited date data on a function?

I have a date picker that throws me a selected date, I need split this date on month, day and year so I can consult another user data, I could split it correctly and the console.log shows the correct...

View Article


"TypeError: dispatch is not a function" when using useReducer/useContext and...

I'm having issues testing my components that use dispatch via useReducer with React-testing-library. I created a less complex example to try to boil down what is going on and that is still having the...

View Article


codemirror-textarea resizable like a standard textarea

Does anybody know how to make a codemirror textarea resizable like text-area ?So that the codemirror textarea can be resized by dragging their bottom down grabber corner.I know it's possible for html...

View Article

Anchor tag not working for window function on v-on in Vue

I am trying to use an anchor tag to create link for scrolling to the top of the page in vue. <template> <a class="scrollTop" href="#" v-on:click.prevent="scrollToTop()" title='Click here to go...

View Article

attributeList.push() is not working in cognito

The email(username) works but the given_name and family_name does not. I want to push this attributes so I can see it in cognito. I am using amazon-cognito-identity.js. Am I doing something wrong with...

View Article

Image may be NSFW.
Clik here to view.

Incrementing two indexes instead of one

I'm trying to make a snake game. To move the snake I have a 2D array that helps me fill the canvas on the rights places, so to make it move forward my logic is to give to every part of the snake's body...

View Article


How to take particular key value pairs from json array

I have a large amount of data in JSON array format. A shorter version of which is as shown below[{"Item": "Item1", "Unit CP": 100, "Unit SP": 150, "Quantity": 1, "TotalSP": 150}, {"Item": "Item2",...

View Article

Keeps calling itself when using the onClick event handler

what I expect to happen: when the user clicks addProject button the event listener will run calling formSubmit and we will check for the date if it's valid or not then if it's valid it will call...

View Article


Book of shaders exercises

I am spending this winter holidays trying to learn something about shaders, I am stuck with this couple exercise:y = sin(x); Try the following exercises and notice what happens:Add time (u_time) to x...

View Article

Hyperlinks not appearing on Twitter Boostrap webpage

I have built a simple webpage using Twitter Bootstrap, and I had some issues with it:Although I have given the navbar a class of navbar-inverse, it just appears as a white rectangle and looks no...

View Article


Node.js HTTP Server- Taking long time to load and is not sending data

I am learning node.js, While using HTTP module i tried to create by own server as per instruction of video tutor but my server is not sending any response at port 3000 and port 8000.*const http =...

View Article

Image may be NSFW.
Clik here to view.

Material table for react font size is way too small

I am a newbie using react, used material-table for my projecthowever the font size is way to small for my liking, Image is attached below I would like to increase the font size of the table.here is the...

View Article

I would like to create a function that compares the hours from moment to a...

I can get this to work creating many if statements by stating if moment.... === 12(example below) but I would like to consolidate it to one by pulling from my div classes labeled 9, 10, 11, 12, 1, 2,...

View Article
Browsing all 139833 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>