Category "jquery"

image height coming back as 0 -- need to get the height after the image loads

I'm enlarging an image on click. I'd like to put a caption right under the image, but to do that, I have to know what the new rendered height of the image is af

Update Total in checkout of Woocommerce with Ajax Request

Before asking question on SO, I searched a lot about what I needed to make a ajax request with WordPress. All my code and the request is working, but is not doi

Cannot read property length of undefined in Datatables

I'm trying to show some data on a Datatable. The data is called from an Ajax request and the response is a Json array, it looks like this: [{"item": "one", "pr

AJAX POST not sending request to express.js server with body-parser due CORS problem

I'm trying to make an AJAX POST request from my html page which runs on an apache server. The request is needed to POST a filename to the express.js server and

How to rewrite costum Gdpr cookie consent jquery code snippet into pure javascript

I need help with Gdpr cookie consent Jquery code snippet below to rewrite it into pure javascript. Can any one please help me rewrite it into pure javascript? T

Use a class as a selector for particles.js

I have the following code which adds particles.js to a element by its id (fixed-back-canvas) but I can't seem to set it to select a class rather than id. Adding

Can't load existing files using the jquery-filupload examples

I am using the code provided by the blueimp jquery-file-upload site from the basic-plus demo example. I have modified it enough to fit my requirements and works

How to get latest version of Jquery through Jquery-rails in rails application

I am trying to fix the CVE's related to jquery as follows. So for that I am trying to consume latest version of jquery. Earlier I had //= require jquery in ap

Javascript and JQuery not working properly in my website project

Js and jquery are not working properly, the menu-toggle button does not work in responsive mode. the carousel (using slick) is not working properly in full page

Get values in JSON object from html input text and label

I have a HTML by which currently getting the values of input elements in loop in an array. But now I want this in json object with its label. Below is my html

How to reset a date in Firefox input[type=date]?

Firefox v57.0.1 supports the attribute "date" for the HTML input tag. I would like in jQuery to reset the date value when the user click on a radio button like

Insert And Retrieve Data in MySQL with $.post Noob Question

Trying to insert data into MySQL database with PHP. I don't want to refresh the page. The data isn't inserted when I press the Send Message button, but the data

How do I display number of selected items in checkbox?

How do I display the number of selected items? I've tried different ways to count the checkbox but it did not count the items when I click "select all". I want

Simple custom sorting function for jQuery DataTables

Numeric sorting is not working on my dataset. So I made a custom sorting that converts whole string into number then sorts based on that, but for some reasons i

Stop swiper slide autoplay on mouse enter and start autoplay on mouse leave

How to stop swiper slide autoplay on mouse enter and start autoplay on mouse leave? I have tried .stopAutoplay() and .startAutoplay() function but not worked fo

searching multiple Object Value in another Object JavaScript

I have 2 array of object in that, I want to compare all of the first array object property and value present in the second array of object. (at the object level

searching multiple Object Value in another Object JavaScript

I have 2 array of object in that, I want to compare all of the first array object property and value present in the second array of object. (at the object level

How can I validate the file type selected from an input element of type file

I am trying to allow users to upload an image by using the html below <input class="file-upload" id="imagepath" name="imagepath" type="file" accept="image/x

How to access environment variables with vanilla javascript

I have an index.html and I need to pass some sensitive information to some JavaScript variables. This index.html contains plain javascript with jquery so I am s

Is there a way to reorder "div" elements ,into a descending order, in the DOM according to their content with the onclick of a button?

I am trying to reorder the "divs" (pushed into the DOM via Javascript) with the onclick of a button. Specifically, I'm looking for a Javascript function to reac