Category "javascript"

webpack dev server only reloads once

Ok so now i have read a lot of different issues on stackoverflow without any luck, they seem all to go to an older version of webpack-dev-server. I have tried a

Cells loosing added classes after sorting in Vanilla DataTables

I am using vanilla datatables (https://github.com/fiduswriter/Simple-DataTables) and have an issue when ordering the rows. When i click the order header all my

Tailwind height transition not working on h-min, h-fit, h-max, and h-auto

So I like to make transition whenever the element change it's height. It works on h-10, h-20, etc. But it doesnt work on h-min, h-max, h-auto. ‎‎‎&l

NodeJS - TypeError: Busboy is not a constructor

So, something happened a couple of days ago and a project of mine started showing the following error: TypeError: Busboy is not a constructor at /app/node_modul

IntersectionObserver does not work on small screens for long sections JS

This script issues the active class for the active section. Recently noticed that it stops working on small screens. Even in the developer's console in chrome,

Generate array with values A1, A2, A3, B1, B2, B3... etc?

I'm trying to generate an array of objects where it outputs an array looking like this: [ { _id: 2, label: 'A1' }, { _id: 3,

Hide or show input on dropdown selection

I am trying to create a sign-up page for my app. All the code works, but when I try to hide input box based on dropdown select, it doesn't work. I tried this: &

Nuxtjs: Access the data of the component from anonymous middleware

how can we access the data of the component (such as infos, similarPosts in this example) from the anonymous middleware in the nuxtjs application?

Error while creating rest API in postman 500

I'm building an API using nodejs for the web I already have a database and the GET request works but when I try POST it gives me This errorError This is the cod

How to convert object notation to a string

Let's say we have an object export const hello = { a: 1, b: 2 } and we import it and have a function import { hello } from ... function printVarName(x) { .

How can I explicitly assign a receiving variable to be an array

ok, so, I was doing this before and its working: let array = []; if (blablabla) array = ["foo","bar"]; else array = ["this", "that"]; FunctionImUsing(array) An

How to sleep a method in javascript method chaining

I am trying to make a method sleep(delay) in method chaining. For this I am using setTimeout with Promise. This will require any method following the sleep to b

How to set the left, top position of a TinyMCE editor?

I'm initializing TinyMCE on a textarea that has an absolute position (e.g. left: 100px, top:100px) but TinyMCE's is set to left: 0px, top: 0px. Unfortunately, I

Pure JavaScript: set min-height of all product title to the highest of them all

In collection pages of our Shopify site, the VIEW DETAILS buttons in every product card are misaligned because of variable lengths of product title. In order to

Using Remark and Rehype plugins with MDX in Next.js (with @next/mdx)

I was trying to use Github Flavored Markdown using @next/mdx but I can't seem to figure out how to use plugins with the code. Here is what I did: (I am followi

How to use Sharp in discord.js to create a welcome image

I recently switched from Canvas to Sharp to create the welcome image that pops up in the welcome channel every time a user joins since I heard that Sharp is mor

exit popup with Javascript

I'm trying to exit a popup with JS. I've just followed a tutorial but nothing happens on my popup I'm just thinking if this is a class problem maybe I'm pointin

How to manage JSON data in javascript pass form django model?

I need to dynamically display my audio on my website. The audio is a file path stored in the Django model. Djanog Model: class audio(models.Model): instrumentId

Google Apps Script search function needs to compare strings containing numbers and letters

So I'm building an incredibly simple database (really just a minor in-sheet MVC) to standardize data storage practices in order to automate some things. I'm try

Cannot access object from GraphQL query (JavaScript)

Subgraph query returns results to console, but my javascript module can't access any values from it, returning an error: TypeError: Cannot read properties of un