Category "jquery"

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.

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.

Filepond Image Uploader - setOptions on multiple instances

Using the Filepond plugin, I want to have separate setOptions for each instance of Filepond. The problem is that I don't know how to get setOptions to work for

jquery 3.6.0 animate width to specific size not working

I have this jsfiddle: $('.btn').click(function() { if ($('nav').hasClass('open')) { $('nav').removeClass('open'); $('.hide').animate({ width: '5

Googlelabs dark mode toggle

I downloaded the source to use google dark toggle but it gives the errors seen below. When I use cdn it is ok but it does not work on localhost source. I do not

file-upload-with-preview.min.js showing error when uploading a large file

file-upload-with-preview.min.js showing error when uploading a large file (say a file of 30 mb).it is showing error. the ajax call is performing on error funct

Running an if statement inside a querySelectorAll Node List

I am building a blog post layout which requires some metadata to sit on one side and stay in place as the content scrolls, using position: sticky. This works fi

Jquery datatables custom button for export

I have a data table that has 2 buttons, the export for pdf and csv. My colleague asked me if possible, there is only one button in the table and when the user c

How to make "scroll drag area" bigger [closed]

I have a drag and drop table and when I want to drag an element from the top to bottom of the table I have to drag it to the "bottom area" of

Use Product Variants Select in Cart Prestashop

I'm developing a cross sell module that will display products in cart that you can add to cart by clicking the button add to cart. I need to take consideration