Category "jquery"

How to fade smoothly between gradients in JavaScript

This code populates a div with a predefined set of gradients and fades through them in a cycle using jQuery's .animate() method: /// Background Gradient Cyc

jQuery click + if + .find function not working

Going nuts here. Trying to write a function where if there's a '.child' class element inside the container, the function fires, but otherwise does nothing. Howe

Allow only one element to be toggled at time

I've created a list of some movie titles. If user has permission he can edit those names by pressing crtl + left click on title that he want to be changed. P ta

getJSON caches file while it is being updated

I have a loading process running which fills my database over the course of roughly 37 seconds on my local machine. I am at this point making a process for this

add a triangle icon to the div opening and closing

I have the code where onclick of the link, i am opening and closing the div here is the code <div id="opendialog" style="display:none;"> <div st

pause and resume http file upload/download

I have 2 servers, one local server(office) another remote server in cloud (storage), users in the office can't access the remote server. I want to create some u

Bootstrap missing top accordion border when accordion-items hidden

I have a Bootstrap 5 accordion component on my page. I also have a JavaScript snippet that makes one or multiple accordion-items of this accordion hide dependin

jQuery AJAX Not Returning Error Message with SQL Server

I'm testing jQuery AJAX to return data from a SQL Server table. In the AJAX call I have a failure function to show any potential errors in an alert box. However

Weglot js call works on chrome but not on Safari - can't figure out why

I'm new to js and jQuery so please forgive me if this code seems a little lost. I'm trying to hide/unhide Webflow classes based on the Weglot language selection

AJAX - How can I build a notification system, that is constantly getting updated, without slowing down my website too much?

I am a beginner to web development, and I am trying to do a notification system with AJAX and jQuery. In my web application, I have a comment system where you c

jQuery Datatable Show / hide columns dynamically

I am trying to show/hide datatable columns dynamically. For this, here I am going with the example which is given by the official datatable website. This is the

TypeError: 'undefined' is not a function (evaluating '$(document)')

I'm using a WordPress site. I'm including this script in the header. When the script loads, I get this error: TypeError: 'undefined' is not a function (eval

How can I toggleClass on this element and hide others?

I would like to toggle show a megamenu clicking on his parent tag and at the same time close all other megamenu if opened. with my basic example code (just to e

Mocking jQuery $() and $ functions in jest

I have a set of tests for the functions in an ES6 class that use $.get(). I was able to mock $.get(). I'm working on testing another function in the same class

Determine distance from the top of a div to top of window with javascript

How do I determine the distance between the very top of a div to the top of the current screen? I just want the pixel distance to the top of the current screen

Displaying javascript calculated variable output as currency

I currently have a variable that is made up of two calculated variables. How ever I need to display the outputted variable as a currency which includes thousand

track.stop is not turning the camera off anymore

I have a webpage where I want user to take a picture with his laptop/phone camera. Once he clicks on a button a modal is shown and the following js will start t

retrieve data from the database and load the data into the table using jquery

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewpo

How to pass parameters from Modal form to Spring Controller with thymeleaf or Jquery?

Anyone can help me? I made a Modal with a form to update a database. I receive data from Mysql DB but when i click on submit, the modal closes, but new paramete

eip.js - Basic edit in place plugin in jQuery

I'm using this edit in place jQuery plugin. I'm trying to set the Ajax request to the back-end server with details. But it didn't work, it seems the plugin eip.