Category "javascript"

Insert data after event.target (Owl Carousel)

I am following this codepen here to insert the current and total number of slides on an Owl carousel. Trouble is it targets a div with ID #counter. So if there

React-router showing invalid hook call

An invalid hook error occurred in my react app caused by react-router but I can't seem to detect where it's coming from. The full error reads as follows: Error:

Target map()'ed items one by one

I want to create a contact form where the form fields are changed after they are filled. For example when you fill the email field, you press enter or click the

require() of ES modules not supported

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: D:\...\node_modules\normalize-url\index.js [0] require() of ES modules is not supported. [0] require

Checking participants of a Twilio Video room before connection

I have a 1:1 person to person room scenario where I want to make sure that they haven't accidentally connected already before entering. So Person A can only hav

npx create-react-app show error when installing

npx create-react-app shoing eror whent installing, please help me how to solve this problem. my nodejs version is v16.14.2 and npm version is 8.5.0 Installing p

Variable returned by Symfony controller always undefined

Ok, so I have a text field in which I type a string and I have a button next to it. <div class="sidebar-search"> <div class="input-group custom-se

Vuetify carousel not taking up full width-height

I want to make a carousel that takes up the full width and height of a viewport. I'm using Vuetify in a vue.js 2 project. Here's my code: <head> <

Pass object to javascript function from ejs

I'm trying to attach a click event from my ejs file but I noticed that when my data coming from my database has a "newline", I get an error that says: Unexpecte

How can i add React loading spinner when item is fetching from database?

Here is, my code. i want to add a spinner when data is loading then after finish loading display the data. {/* product section */} <section className="c

React Redux Problem: How to call multiple api in your react component with React Redux Toolkit RTK queries?

Hope you all are doing fine. RTK queries return response in data attribute which can be accessed via hook generated by RTK My Code: const {data = [], isFetching

React native expo web page refresh from chrome browser

ima having a react native web app and when i refresh the page from browser, it navigates to my apps homepage. is there any way that could fix that issue. it ha

React native expo web page refresh from chrome browser

ima having a react native web app and when i refresh the page from browser, it navigates to my apps homepage. is there any way that could fix that issue. it ha

"SyntaxError: Unexpected token < in JSON at position 0"

In a React app component which handles Facebook-like content feeds, I am running into an error: Feed.js:94 undefined "parsererror" "SyntaxError: Unexpected

How would you create a button to format text in a <div> with JS?

I'm trying to make a basic text editor in HTML. I've got an editable div tag so far, and by using keyboard shortcuts, you can format it. However, I want it so t

Hovering over Morris Chart is not working as expected

Hovering is not working for my chart, any suggestions as to what it could be? This is a django template with the Morris Chart within. I've got Morris Chart work

Factory Function JS

Hello, Can someone please explain me this const {r,g,b} = this; Why it has no variable name, if 'this' is the variable name, to what that 'this' pointing to? f

How can I render only once an Alert component in react native?

How can I render only one time an Alert component in react native if my dashboardScreen is being render many times? I'm using Context api, if I dispatch an acti

React native - undefined is not an object (evaluating '_bip.default.generateMnemonic')

I'm building a mobile application and I need to generate a passphrase using bip39. At first, when I installed the package from npm I got missing dependencies er

How can I add animation to Bootstrap dropdowns?

How can I add animation to the dropdown? I assume by modifying popperConfig, but how? At the moment dropdown-menu has a generated inline style, e.g. position: a