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
0answers
7 views

Trouble running signature script

I am creating a document on my website which requires a customers signature. I have taken the signature element from https://codepen.io/nonsalant/pen/JYpjvE I have made some slight changes as I dont ...
1
vote
0answers
29 views

Problem with tables (huge data) on Word-press site

I created bootstrap table for my word-press site.I created custom template to publish my table on my website.The problem is that my tables has a 2000 pages and each pages show 10 entries and consists ...
-2
votes
0answers
15 views

How to Display only value and exclude index from loop jquery?

In jquery how to remove index from value. I have doing following code var $values = $.map(domelts, function(elt, i) { return $(elt).val();}); var option = ''; for (var i=0;i<$values.length;i++){ ...
0
votes
1answer
16 views

Unable to uncheck checkbox with jquery in wp admin

My js code: $('div[aria-label="Asukohad"] input[type="checkbox"]').on("change", function() { var element = $(this); if(element.is(":checked")) { //todo } else { ...
0
votes
0answers
11 views

Show the subcategory name based on current product

Hi I can display subcategory name in current product page (single product page) but it showed all the subcategory name. I just want to show subcategory name based on the product selected. I have one ...
0
votes
1answer
15 views

How can publish my bootstrap created table ( huge amount of data) on my word-press theme?

I created a bootstrap table which is interactive with data-tables also.I use jquery too.How can i publish this table on my word-press table (code is working ).Thank you... I just want to publish ...
0
votes
1answer
12 views

checkout stripe with plugin contact form

I have an issue with stripe, i am using the plugin contact form 7 stripe & paypal addon, but when i fill the form with my bank informations and i click on checkout button the page is stuck and the ...
0
votes
0answers
21 views

My website frequently redirect to a different advertisement URL

Can you guys help me to figure out why it's happening? Its mainly happen from my search engine result. From Google search when I click on my website it will redirect to a scam website. Note: now its ...
0
votes
0answers
10 views

Video Gallery similar to Google Image search

Has anyone discovered a good, reliable plugin that has the same mechanics as Google Image Search — i.e.: the thumbnail expands a panel below with info and media? My client is trying to create a page ...
0
votes
0answers
18 views

How To Display PHP Loop Data Using jQuery or PHP?

i have this php file i want to show same input field in both place, actually what i want, i want an input box after question, sample field $clue.="<input type='text' id='field_2'>"; i want to ...
1
vote
1answer
40 views

Dynamically update post title in admin page

I have a textarea in admin post page when creating new post, that's title: <textarea id="post-title-0" class="editor-post-title__input" placeholder="Add title" rows="1" style="overflow: hidden; ...
1
vote
1answer
75 views

class click counter save number

When the user clicks class count the counter should work: <div class="pop-btn" class="counter"><a href="https://www.example.com">Know More</a></div> <div class="count">&...
0
votes
1answer
30 views

Fatal error: Uncaught Error: Call to undefined function wp_nav_menu()

I am getting this error which Fatal error: Uncaught Error: Call to undefined function wp_nav_menu() in /home/stageidg/public_html/idg/wp-content/themes/idg-child/secondmenu.php:2 Stack trace:...
0
votes
1answer
39 views

WordPress AJAX return 0 - My case

My problem is the same as in other cases, but my code is fine, I compared with another and followed all the instructions and good practices, but it does not work. Here my code: jQuery("#genera-pdf")....
0
votes
0answers
14 views

wp_set_object_terms returns 500 error when called through AJAX function

I created dropdowns on the front-end to allow an admin user to change the custom post taxonomy values. On a save button click it runs an AJAX call to a separate PHP file. $.ajax({ type: 'POST', ...
0
votes
0answers
7 views

jQuery UI with touchpunch not fully working on touch devices

I'm currently trying to get the jQuery UI sortable function working on my Android phone (touch). Sadly, the touch event don't works on my phone. I've tried everything. jQuery("#details-inner")....
0
votes
1answer
40 views

Finding post ID dynamically on click

Goal: I'm making a portfolio website in Wordpress. It's the first time that I have setup a Wordpress page by myself (I have done on internship but those were template-ish). I have seen this website ...
0
votes
0answers
15 views

Customise GravityForm Field to accept multiple entries

I need to customise an input field in GravityForm to be like the highlighted part of the screenshot https://snag.gy/LIOsoh.jpg The input field will have a dropdown to add Adults, Infants and Children ...
1
vote
1answer
30 views

How to hide CSS by default and show on button press

I have the Elementor Pro page builder plugin installed and I want to setup a expanding column so when a button is pressed it expands more Elementor sections. I'm pretty certain this can be done with ...
1
vote
0answers
11 views

Why is on status span no search results?

i have written some jQuery code for my wordpress plugin : jQuery("#kd_nr_search").autocomplete({ minLength: 2, source: function (term, response) { jQuery.post({ url:...
0
votes
0answers
16 views

Dynamic form with Settings API?

I have a form in the admin-backend of a selfmade plugin, written the old fashioned style. So I'm not using the Settings API. Instead I've written a form, added nonces, wrote an endpoint checking the ...
-1
votes
0answers
17 views

JavaScript onclick event with multiple functions

I have two buttons. Both have hyperlinks to IP addresses. My question is how can I redirect to the IP address & logout? <!DOCTYPE html> <html> <head> <title>Title ...
0
votes
1answer
45 views

How to use jQuery validation to set the search bar to accept only a specific input?

I'm new to the wordpress world. As a starter theme I was suggested to use the basic one given by underscores.me. The search bar is fundamental for my site, so I would like to customize it in order to ...
1
vote
2answers
22 views

Force uppercase on some WooCommerce checkout fields input

I'm using this code to limit max number of characters to a determined field... is it possible to force UPPERCASE? Here's what I'm using: add_action("wp_footer", "cod_set_max_length"); function ...
0
votes
0answers
43 views

Uncaught TypeError: Cannot read property 'cycle' of undefined

Uncaught TypeError: Cannot read property 'cycle' of undefined at HTMLDivElement.<anonymous> (bootstrap.js?ver=5.2.1:473) at Function.each (jquery.min.js:2) at n.fn.init.each (jquery.min.js:2) at ...
1
vote
1answer
23 views

Update html tag class values based on Woocommerce product attribute dropdown selection [closed]

I have started to build a Woocommerce site, created a variable product with 2 product attributes for variations. The first product attribute is "color" and the second is "size". I would like to add ....
0
votes
0answers
12 views

Custom jQuery not triggered/working after gravity form default validation error message gets displayed

I am adding custom jQuery to display certain fields on the basis of conditional logic. For eg: When a "Business Type" field value is selected as Company, "Company Name" and "Company Website" fields ...
2
votes
1answer
39 views

Change add to cart text if a product is in cart on WooCommerce

In wooCommerce, I am changing add to cart button text when a product is in cart with the following code (added to functions.php of my child theme) that works well only for simple product type: ...
3
votes
1answer
515 views

WordPress 5.2.1 deactivated my jQuery

I've been using the code below to use Google's jQuery but the latest WordPress version deactivated it. How can I use jQuery from Google? //* Use Google's jQuery add_action('init', '...
0
votes
1answer
36 views

How to keep HTML form field that is conditional hidden with javasript hidden after page reload?

I have an html form in which I conditionally hide a field with javascript if an option is selected in the dropdown. The javascript condition works fine but when the page is reloaded the condition is ...
1
vote
1answer
34 views

How to add WP API and JS featured image attachment

I would like to fetch the image from the wordpress rest api - I have the following code: HTML: <div class="post-item"> <div id="posts">Loading posts... </div> Ajax script: <...
0
votes
1answer
27 views

Insert Into Post Not Working For Audio File Using jQuery

I am trying to insert an audio url from the media library into a field in my custom metabox. I used jQuery to do a similar action but to grab an image url instead and that is working perfectly. For ...
0
votes
0answers
56 views

Infinite scroll without plugin using ajax

I've created an infinite scroll without using any plugin to achieve the objective. The problem is that the bootstrap masonry cards grid are loading all the posts cards at the first scroll or will load ...
0
votes
1answer
16 views

How can i send id of the currently posted form data through json response in custom wordpress plugin?

I've used wp_send_json() to send the currently posted form data but cannot find a way to send the id attached to it which is incremented automatically from the database,, so that i can update the ...
-1
votes
1answer
37 views

controlling the showing and hiding of the website logo

I'm using the following css to hide the logo at the top left area on my website: .home .logo-for-panel { display:none; } However I hope the logo will appear gradually when I scroll down to 2nd ...
-1
votes
1answer
33 views

Auto Sorting List Alphabetically

I'm trying to simply sort unordered lists when they have the following ID. The code works in a fiddle perfectly https://jsfiddle.net/w19Lbjqt/2/ but when i try to run it on my site it doesn't work ...
1
vote
1answer
35 views

How to deregister a jquery version for a specific page?

in the effort to fix an issue with my website, I needed to include a specific jQuery version through functions.php in my theme folder, but this leads to some compatibility problem with avada ...
1
vote
2answers
40 views

Remove commas from WooCommerce checkout addresses fields

My client's WooCommerce shop is exporting orders as comma separated files for creation of packaging labels and accounting in C5. When users enter an address with a comma upon checkout, this screws up ...
0
votes
1answer
336 views

Script doesn't load because of a javascript MIME type error

I'm trying to get the jQuery Masonry plugin to work on a site. I've updated my template files to get the proper classes where the plugin needs them. Then I enqueued my scripts like this: function ...
0
votes
0answers
12 views

openssl_decrypt returns empty value when used inside PHP function called throw AJAX

I'm using jQuery and AJAX to call a PHP function when a user enters certain pages. The PHP function receives a parameter that needs to be decrypted, the thing is, for the decryption I use the ...
0
votes
0answers
42 views

WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”

I spend a lot of time searching for a solution to this issue. I looked on google and stackexchange but didn't get the answer. So I am looking for the solution is while making an ajax request through ...
0
votes
1answer
30 views

How to make JQuery load on top of head tag before everything

my website and plugins insert some jquery code between HTML tag and also whatever I do to insert jquery as a first script in the head section I can't get it to work I tried function ...
0
votes
1answer
23 views

A $_POST should occur when submit form but is not?

When I make a modification to data that is read into a form using MYSQL, I want to apply those changes to the database. But even when successfully submitting a form, the $_POST values are not ...
0
votes
1answer
50 views

Plugin not working & permalink erorr after upgrade to php 7x on Nginx

This plugin code was working fine on apache server with php5 but now i am installing on nginx with php7 & wordpress 5.x, its having permalink error (showing 404 error). It's working with wordpress ...
0
votes
0answers
17 views

Woo commerce, Adding Variation Issue

I'm getting a jquery error when I create variations from all attributes. Anyone else experience this or any idea how to fix? /wp-content/plugins/woocommerce/assets/js/admin/meta-boxes-product-...
0
votes
0answers
18 views

Search Results not displaying for multiple words ( more than 2 words) search

Searching for a single word works as expected. Searching for multiple words that should have returned results shows blank results. Manually changing the "+" character in the URL to "-" displays the ...
0
votes
1answer
12 views

Add Index to Item in Wordpress Gallery

I'm creating a gallery of images using the [gallery] shortcode and Jetpack's tiled gallery feature. When the user clicks on an image I'm triggering a carousel (Owl Carousel) with carousel.trigger( 'to....
0
votes
1answer
41 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
30 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
87 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 ...