Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jquery]

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is included with WordPress, and available to both themes and plugin developers.

0
votes
1answer
22 views

Loading two different AJAX requests on two different pages

I hav ebeen trying to call two separate AJAX requests, on separate pages, each pulling in their respective parts. Right now, it only pulls in ONE of the AJAX requests on both pages even with specific ...
0
votes
0answers
2 views

MagnificPopup: How to update setInterval slideshow [migrated]

I'm trying to create a slideshow for inline content using MagnificPopup! everything is fine except when I clicked on next/prev buttons it should be re-set a new Interval 8 seconds for each content!! ...
0
votes
0answers
4 views

OMDB Api Jquery Autocomplete render problem [on hold]

I use omdb api to list the movies and used ajax inside ajax while doing this but having trouble doing rendering. What I want to do first is to list the movies with http://www.omdb.com/?s="movie-title ...
0
votes
0answers
28 views

WordPress Thickbox Navigation Issue in Gallery

I am adding an image gallery via wp media uploader. In the frontend, I am trying to show these images in Thickbox pop-up. However, it shows the images in pop-up but when I navigate [next and prev ...
0
votes
0answers
12 views

Export button not displaying using jQuery DataTable Buttons Plugin

In a custom wordpress plugin, I am trying to add an export feature for the table that is displayed using jQuery datatable(https://datatables.net). Export buttons from the jQuery datatable buttons ...
0
votes
1answer
14 views

jQuery instantly executes (a button click and css change) on load

I am following this other thread to get jQuery into my admin settings page: https://stackoverflow.com/questions/28248113/jquery-is-not-defined-in-wordpress-but-my-script-is-enqueued-properly My ...
0
votes
2answers
28 views

Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test

I've been trying to grasp AJAX for the past 12 hours and i'm slowly losing it. How can I simply pass two basic input dates via form or any other means, not refresh the page, and have it execute the ...
1
vote
0answers
26 views
+50

How to link Wordpress heartbeat to ajax form

I have a form that $_POSTs an input value, and user's ID that saves the data to the database: // frontend form <form id="form"> <input type="radio" name="location" id="name1" value="1"&...
0
votes
1answer
12 views

What is the propre way to include jQuery UI Datepicker's CSS in plugin?

I was looking for a datepicker, I read in another question's answer that jQuery UI's DatePicker is included in WordPress. To make it work I needed to add in script inclusions wp_enqueue_script('...
1
vote
1answer
16 views

Wordpress Admin AJAX Serialize

I have tried to send serialized data via wordpress admin ajax, but i am getting output in below format instead of serialized format. reviewerNotes=approved&app_rej_posts=118059 Jquery Ajax ...
0
votes
1answer
35 views

Accessing javascript in multiple files

in order to access jquery with a $, I am wrapping my Javascript file in (function($){ ..... })(jQuery); This works fine, but I would like to add another javascript file which contains functions ...
0
votes
1answer
22 views

Trying to add google ad onclick to wordpress and Divi buttons and header link

I'm trying to add this code in wordpress below to a button (Divi theme, using Divi builder) as well as to one of the top menu items. it seems like i need to use some jquery, which is beyond me. Any ...
0
votes
0answers
12 views

CPT using DataTables as content - still editable on website pages

I'm trying to use the jQuery plugin DataTables with WordPress. I have created a CPT that contains a DataTable as content of post. Then I have a meta box with the DataTable (not using the Editor ...
0
votes
1answer
28 views

Save user total active time after login in wordpress [closed]

I want to calculate the total active time of the user after user login in wordpress site. For this i am using the following hook in my custom plugin: add_action('wp_login', 'save_login_time', 10, 2)...
0
votes
0answers
21 views

JQuery modal not loading video on popup, only displaying it after multiple reopenings

I am trying to load a PHP function into a modal, containing a video. I'm currently using jquerymodal.com's plugin to achieve that. Here's the current .js code I'm using: https://jmp.sh/v/...
-1
votes
1answer
34 views

How to Add Body Class, and Remember/Retrieve it Through Local Storage

I want to create a system, where upon click of a button, a body class is added and the value is stored in local storage. The value is retrieved from the local storage, and is put again in the body ...
-1
votes
1answer
40 views

ACF repeater image in video poster with jquery

I'm having problems for jquery to send a url from an image to an html tag. I explain; I have an ACF repeater with 5 variables, including an image intended to be a poster of a video and what I'm trying ...
0
votes
0answers
12 views

Get String returned by function get_the_title () and show it in Metabox without clicking on “Update” or “Publish” Button

I have the following code in my functions.php that shows or replicates the same text in Capitals of the "Title" field of a WP entry, in a Metabox that appears when the same entry is edited. ...
0
votes
0answers
29 views

a weird attribute on every html tag

me and my friend working on a Wordpress site but we see it differently on our machines, He sees a weird attribute wfd-id="" on every html tag in google console when he inspect it, also I loaded ...
0
votes
0answers
10 views

How to reload masonry grid from Wordpress Sydney theme portfolio and image carrusel from Wordpress

I have a button that toggles from the image carrusel to the fp-portfolio widget. It works, but the problem is that when it toggles, the widgets appears like break or un-layout, but when I click in a ...
0
votes
1answer
39 views

Opening a JQuery modal window on click of a button with a JQuery plugin

I am trying to open a Jquery Modal window on click of a button. And inserting this Button into a plugins content template (WP SHow posts). I'm using jquerymodal.com's modal code, since I don't need a ...
0
votes
1answer
17 views

How register library to use jquery correct

How register from my plugin level correct jquery? If i run this : function insertJQuery() { wp_deregister_script('jquery'); wp_enqueue_script('jquery', 'https://ajax....
0
votes
1answer
18 views

Images with overlay

I have some images in a container that I would like to add an overlay and an icon. This doesn't work out of the box, but I found some code that helped: HTML: <div class="main"> <span ...
-1
votes
0answers
35 views

jQuery code not working in WordPress but working in local chrome

I have a code that is working fine in on my local Chrome & Firefox browsers but not when I'm loading it in my function.php file it's not working as intended i.e. on hitting the 'submit' button ...
0
votes
1answer
19 views

How to create an Email Subscription input in WordPress?

I can't find a good guide to create a simple input, that allows the user to submit his email and add it to a user's email's database in WordPress and also auto send the user a confirm email. I'm ...
0
votes
0answers
28 views

jquery Autocomplete

I know somewhere is answer but i search everywhere. I have json-server with large data http://localhost:3004/kody Data looks like this: [ { "name": "something", "postCode": "something" }...
0
votes
1answer
26 views

jQuery for Fade Preload Causes My Site Favicon to Disappear from Tab of Browser

My website's favicon that is seen in tabs of chrome disappears when i use the following jQuery. Removing this script from head makes the icon visible. But why a seemingly simple and unrelated code ...
1
vote
0answers
13 views

Why ajax doesn't work on certain wordpress hooks and reload the page instead?

I built an ajax function which works perfectly when i hook it to admin_head or admin_notices hooks but it doesn't work when i hook it to manage_posts_extra_tablenav hook, instead of doing the ajax ...
0
votes
1answer
27 views

shortcode execution when the page is opened

Is it possible to have a link to a page in my website trigger a shortcode button without leaving the home page! I have a shortcode button that activates the ordering process for the customer but I ...
0
votes
0answers
9 views

How to implement required input validation?

In Wordpress, the add-new-user page, for example, has some jQuery validation to make sure that the username isn't empty. It provides with visual feedback like the following: I'm working on a custom ...
0
votes
0answers
15 views

List current category children on form results that uses AJAX

Ok I will try to describe my problem as best as I can. I have a website with ad listings. On listings page there is a filter form which has categories list on the left that uses AJAX to print results ...
1
vote
1answer
29 views

Register jQuery - OOP WP

I found this post that seems to make an Ajax script work in an OOP model. I found it interesting to add the script via a class function rather than a different file, it would be very useful to me. ...
0
votes
0answers
20 views

Filters posts using AJAX and then reset query with a button

I am using ajax to filter a custom post type. I want to add a "reset" button that destroys the ajax session and shows all posts instead of the filter. The filters are activated on change with query. ...
0
votes
1answer
35 views

Bootstrap Carousel Slider - CSS & JS not working

i think css or js file not load how can i solve it. functions.php here. function pp_scripts() { // Registering Bootstrap style wp_enqueue_style( 'bootstrap_min', get_stylesheet_directory_uri().'/css/...
-1
votes
1answer
20 views

Unable to understand this jquery code [closed]

I recently came through a website and checked its functionality. I visited their main javascript file and came through this code. var featureIconHolder = $(".feature-icon-holder", "#features-...
1
vote
1answer
36 views

Automatically append ID to at the end of specific URLs

I need to be able to automatically change normal links to affiliate links on my Wordpress website. For example: when I add a GOG.com link, it should automatically append my partner ID at the end of ...
0
votes
2answers
53 views

All AJAX requests return a 400 error

I have been delving into AJAX within WordPress and have followed many tutorials on how to do so, but every single request returns a 400 error. In my functions.php I have added the following: Step 1 -...
-1
votes
2answers
22 views

Load css classes after using ajax calls

I wan to add a responsive div to my wordpress page using bootstrap css, just when i enqueued bootstrap style it distroy themes, so i wan to make that div load using ajax call, call that enqueued style ...
0
votes
0answers
10 views

Wordpress contact form 7 compare dates

I am using a contact form 7 plugin. I have two dates fields - date-from and date-to. When I am clicking on date-to,i must calculate the difference between date-from and date-to with jquery function. ...
0
votes
0answers
38 views

how to display new private message to users?

We have created a user panel for our users in our site. Now we want to make a new part in the toolbar of the user panel to send private messages to every user we need. For that, we created a post type ...
2
votes
2answers
36 views

Fire jQuery function when post edit screen loads

Trying to get this function to work. But keep getting a jQuery not defined error. I have tried many variations here to get the jQuery to work: https://blog.templatetoaster.com/fix-jquery-is-not-...
0
votes
1answer
51 views

How to save multiple custom user profile fields using repeater JQuery

I'm trying to create a multiple custom user profile fields to allow our users adding more software skills in their profile page. The problem I'm facing is it always saving only one meta for "skills" ...
0
votes
2answers
57 views

underscore template dynamically remove row Jquery

I have this underscore template to add and delete row : <# jQuery( document ).ready( function() { jQuery( '.add-ingr' ).click( function() { jQuery( '#re-ingr .ingr' ).append( '<div>&...
0
votes
0answers
11 views

WordPress Product designer with draggable textarea issues

I am working with gold product designer and when we try to convert cavas2png, i am having a problem with multiline text How to define fix character in a line when converting to canvas to png Please ...
0
votes
0answers
29 views

AJAX POST Value not being returned - Wordpress - AutoTrader API

I've got an API integration which I am currently sorting and I need to return a value when a select field is changed. The data is being pulled from the Autotrader API - I have a vehicle 'Make' ...
0
votes
0answers
58 views

Json Ajax Response Error

I get an Error by trying to get data from a SQL-Query to append the data in a Dropdown Field This is the Error: TypeError: right-hand side of 'in' should be an object, got string here my funktion ...
0
votes
2answers
25 views

Wordpress error when replacing local jQuery by externally-hosted

I'm trying to load jquery from CDN instead of loading natively with wordpress. In my functions.php I have done it like below, making sure it should only happen on the front-end: function ...
0
votes
0answers
12 views

top page fixed div background images scroll effect

Is there any plugin to obtain the same effect of the top page of this website I see from the inspector that there are a container div and another three that have a fixed position and a 100vh of hight. ...
0
votes
2answers
23 views

change background image on scroll

I want to create a background image effect that will change the image when the user scroll. I'm facing a problem with the images urls, how i can fix this? How I can link an image url in jquery from a ...
0
votes
0answers
30 views

Conditionally load JS and CSS from plugins after AJAX request

I am using History.js and Ajaxify to refresh content on my Wordpress site. Everything is working fine. Content in my selected div gets refreshed, menus update, etc. But Javascript- and CSS-files ...