Skip to content

Is “pause” event called on any kind of audio stop?

MDN says: The pause event is sent when a request to pause an activity is handled and the activity has entered its paused state, most commonly after the media has been paused through a call to the element’s pause() method. But what if the audio stops because it stalled, or on an ended event. Would it sti…

Getting jQuery to push a value from an ‘a’ link

Hoping this is fairly simple and I’ve just overlooked something… I currently have a page with a bunch of checkbox options. Each checkbox will execute a very simple script adding its value to a string, where it then gets passed over to PHP to do the rest. The html part for the checkboxes looks like…

useEffect with many dependencies

I am trying to fetch employees and here is what I am trying to do using useEffect Here I want to achieve 2 goals: fetch adminEmployees if (adminEmployees===’unAuthorized’) then go to loginPage but when doing this as in the code, it creates infinite loop. How can I achieve the desired functionality…

Next-auth CredentialProvider config and redirect

I’m a bit confused on the implementation of the credentials provider and the redirects. The documentation says that the credentials provider doesn’t support a callback and its for the OAuth providers. This is fine. However, instead of staying on the page and flashing an error message or even loggi…