I’m trying to find a way to insert html element tags into a table structure. There are often multiple tables in an html page so I dynamically create and insert an ID for each table which works fine. However, when I try to insert specific html elements into the different portions of the table I get nothi…
Category: Questions
showing/hiding html elements with javascript
which option among the following is better or used as a standard way to show/hide the html elements changing element.style.display adding/removing a separate class called hide {display: none} any other standard way PS: this JavaScript hide/show element question uses the first option mentioned( changes the sty…
Improving scroll effect with one side scroll and the other change image based on scroll position
I created this scroll effect, where div is divided into left and right side – left side contains of images, that change based on scroll position and it’s fixed and right side is scrolling content. This is my idea: https://codesandbox.io/s/scroll-effect-forked-ssi3x?file=/src/index.css To describe …
Svelte re-rendering a virtual list of images causes images to flicker
I’m not sure if I should be posting this here or adding to svelte creators github, but I have a problem here which may need a fix to be applied on the svelte side. I am trying to render a virtual list of images, by only having the images that are shown in the viewport, in the DOM. Here’s a
convert dateTime format in react js
i have this date : Mon Aug 23 2021 15:03:00 GMT+0430 (Iran Daylight Time) how to convert this format: 2021-10-10T00:00:00 Answer You can do it as follows: If you don’t prefer the native way of converting it you can use the library Moment.js. Your code would look as follows: If you don’t want to ke…
Trouble with splitting gulpfile.js into multiple files in Gulp 4
I am a beginner to Javascript and Gulp. Am learning this based on a udemy course in which Gulp 3 is being used, and I’ve been looking at docs to convert the code to Gulp 4. It’s been fun so far since I am learning more when I am doing the conversions myself, but am stuck on this one. Wonder
Cannot set property ‘srcObject’ of null in Vue.Js
I am using vue.js with element-ui library and I have this problem where I need to show this dialog component to be able to show the camera and the user’s audio but I have the following error in console TypeError: Cannot set property ‘srcObject’ of undefined” As you can see, first I am …
angular can not get user data form sessionstorage
sorry about my english. I use sessionstorage for keeping data. In sessionstorage have data enter image description here but in html, not showing data form sessionstorage. when I get only {{currentUser}} in html show like this enter image description here mycode services html and component how i can do to use …
How to add a decimal to jQuery animated counter?
I have an animated jquery counter that’s working fine, but I want to change the end number to a decimal number. So at the moment it’s counting up to 54000, but I want it to give me 54,000. How do I do this? jsfiddle is here Answer Try to use Number.prototype.toLocaleString(). Replace $this.text(th…
Check role that is added guildmemberupdate discordjs
On the event guildmemberupdate, I am trying to see if the event is in my server and if the role is a certain role. If all things are true, it will send a message. It does not send a message though Here is the code It doesn’t send ‘test’ Answer The guildMemberUpdate event requires the server …