Category "javascript"

How do I use an array from main js file for different js file?

I have a task to make a blog thumbnail and blog content from input that looks like this: blog.html This is the thumbnails which is located in the same HTML file

css toggle nailboard effect

The interface shown below toggles if the toggle button is clicked. For now I used only opacity to toggle the visibility but it doesn´t look even close wha

Delete table row with JavaScript?

I am adding some data with JavaScript with no problem but I wanted to delete a row by adding delete button inside the row which I add, but I couldn't do it. The

How to display image name in Ant design <Image.PreviewGroup> component?

<Image.PreviewGroup> <Image width={200} src="https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg" /> <Ima

How to get data from API in vuejs?

I'm fetching Data from an API using Axios and i'm displaying them as Cards in a Component movie cards, the thing is that i want to be able to click on a single

How do I change the increment/decrement number based on response data?

The backend calls to increment likes depicted by handleLike() and handleLike() functions successfully return the response of containing the number that's been i

d8 Warning: unknown flag --print-ast

When I run d8 --help there is indeed no --print-ast. How can I print AST?

How to return id of a row from v-data-table in VueJs

I'm currently struggling with returning the id of a specific field from each row. I need this id to use it as a parameter for a function that will be used in an

TypeScript how to call function with its name

I am new to typescript, when I type: (dialog is imported from a library) ipcMain.handle("openDialog", (event, method, config) => { return dialog[method](wi

Is there a way to make custom CSS properties in JavaScript?

Is there a way to create custom CSS properties in JavaScript? Example Note: this code won't work, it's just showing the sort of thing I'm looking for. I'm looki

Is there any way to add a pattern to the stroke of moveable line

Here is my code to add the pattern to the stroke of the moveable line. when I try to move the line, the pattern remains in the same position. It should move ins

Lazy load images in a modal with a slider

I have a website that I am trying to optimize and one of the things that keeps coming back is I need to lazy load my larger images that I have inside a modal, t

Limit incorrect guess attempts in Hangman Javascript

I'm trying to code a hangman game where a user only has three incorrect guess attempts. i.e. if they guess the correct letter they continue playing. If they gue

Hi all, add class on multiple button on each click

All, I got the requirement that on each button click, a class should be added in the dropdown menu, and on the button and outside click, the cancel button shoul

Preloading a large background image without rendering the website

I would like to make sure that my image preloads properly, as there's an svg effect, that only looks good when the background is loaded. function preloader() {

CSS : selecting multiple nth-child

Say I have this css : div div p:nth-child(1), div div p:nth-child(2), div div p:nth-child(3), div div p:nth-child(4), div div p:nth-child(5) { } This will sele

Display a list when i click next or previous button in VueJS

I would like to manage a case in js view. I have a list of employees who arrive in a department and also leave the department. My list returns me 3 objects (ent

Avoid URL parameter Manipulation

So in my case, after a user chooses a certain room, the number of nights he will stay and the number of guests, the price gets calculated (depending on certain

Retrieving images from json server and display with relevant question

I am building a trivia app. initially I just implemented plain text Q&A trivia but now I also want to add images with questions. I am getting data from my l

Color picking by coordinates

When using a colorpicker like from google, the luminosity at the top left is 100%, on the top right it is 50%. However on both corners on the bottom the luminos