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.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Ask page leave confirmation with Bootstrap modal [on hold]

Is it possibile to ask page leave confirmation (to prevent lost data changes) on beforeunload event with a Bootstrap modal?
-1
votes
0answers
11 views

how to add popup when i choose custom attribute in woo commerce [on hold]

I have created a variant product in woo-commerce I want the popup when I choose an option in (Select your lens) any one could help me? Product image is here 1
0
votes
0answers
10 views

How to resizable jQuery into div [on hold]

I would like to know how it is possible to write a script that allows frontend users to change the height of a particular div. I can do this in JSfiddle, but cannot figure out how to translate this to ...
-2
votes
1answer
14 views

I want to used sort() in JavaScript file but this doesn't work ? Given below the code which i am using [closed]

function.php file code $vars = array ( 'data' => $data, 'categories' => $cat, 'access_zero' => $access_zero, 'access_one' => $access_one ); ...
0
votes
0answers
10 views

jQuery Validation plugin with AJAX and PHP Superglobals strange behavior

I wrote a HTML form in a WordPress template and I want to validate it with jQuery Validation plugin but I have problem with AJAX validation, this is an extraction of what I wrote: add_action( '...
0
votes
0answers
9 views

.outerHeight(); getting decimal value? [migrated]

It is possible to get a decimal value of .outerHeight(); Right now it's returning a rounded value. $(window).resize(function() { var div_height_2 = $(".home-row-3-1").outerHeight(); $...
0
votes
0answers
27 views

Override parent theme deregister

I have a parent theme that deregisters a script, in my case jquery. It does it like this: function parent_enqueue_scripts() { wp_deregister_script( 'jquery' ); [...] } However, in my child ...
0
votes
1answer
20 views

jQuery Validation plugin and Bootstrap 4 CSS classes

I'm using jQuery Validation plugin to validate a WordPress theme form. I'm using also Bootstrap 4 so I'd integrate the Bootstrap validation classes ("is-valid" and "is-invalid") with Validation plugin,...
0
votes
0answers
17 views

don't let duplicate ajax field

I need someone to help me not to let me create duplicate names. In real time. In case of duplicate give a duplicate alert and not submit the registration. <?php $test3 = get_post_meta( get_the_ID()...
0
votes
1answer
41 views

Get value of selected option in select field in a Wordpress form

So I am trying to get which option is selected without submitting it to server side. I have 2 drop down fields, the first one is of last names and second one is of first names. Both are populated from ...
0
votes
1answer
21 views

update_post_meta Not Processing Array Data (Not Sure What I Am Missing)

Thanks in advance to anyone and everyone who is taking the time to respond. So here is what I am trying to achieve: Essentially I am trying to create a plugin to just edit all the meta descriptions on ...
0
votes
1answer
14 views

jquery anchor effect does not work properly

I have the following script that provides an anchor effect: // Smooth scrolling when clicking on a hash link $('a[href*="#"]').on('click', function (e) { e.preventDefault(); var ...
0
votes
2answers
44 views

I can't get a return value from Ajax

I have an HTML form that is used to send messages to a back end server. When the user clicks the send button, it triggers a javascript that makes an Ajax call to WordPress which in turn, makes an API ...
0
votes
1answer
28 views

Add JQuery As Code Snippet

I would like to add jquery code snippet for Woocommerce checkout page for a specific product in the cart, but I'm confused on how to adapt the code to wordpress. Any ideas? Here is the code: ...
-1
votes
1answer
21 views

FacetWP: Plugin breaks button/modal functionality inside searchable content area

I am currently testing the FacetWP trial with two facets on a post archive page, using the WP-show-posts plugin for displaying posts and modal-video.js (https://github.com/appleple/modal-video) for ...
0
votes
0answers
11 views

Uncaught TypeError: Cannot read property 'arrayToDataTable' of undefined [migrated]

//google.charts.load('current', { 'packages': ['corechart'] }); //google.charts.setOnLoadCallback(displayDonut()); var displayDonut = function () { var elementId = ''; var inputData = []; ...
0
votes
0answers
4 views

modifying wp-playlist.js renderCurrent

I'm adding a parallax scrolling background to the wordpress playlist using jarallax. I want to be able to bind to renderCurrent found in wp-playlist.js renderCurrent : function () { var ...
0
votes
1answer
32 views

Theme customisation - how to store javascript externally when it utilises php variables?

EDIT: Complete re-write I have been developing a custom extension for my theme over the last few weeks. This is my first time "developing" with Wordpress. All works fine and I am happy with the ...
0
votes
0answers
20 views

is scroll lazy load without external script from wp possible?

i dont want include different js files because of slowing if it is not necessary. i dont know js,jquert etc. so i want only copy paste.is scroll lazy load without external script from wp possible in ...
1
vote
1answer
93 views

jQuery selectors for editor elements safe to use?

Let's say I want to monitor all the editor blocks. In the standard editor (5.2.2) I can just select the blocks with e.g. $("div.wp-block"). Will this work across plugins etc or will some plugins alter ...
0
votes
0answers
21 views

Dropdown list that loads Product Comment Form

I am trying to create a dropdown of all product in my WooCommerce store and based on the selected product I want to display that products comment form. I want to create a page with this code in it. ...
0
votes
0answers
18 views

CPT search NOT finding results from posts title

I have a search bar to search for CPT (properties) on a page and show results below it including on a map. The search works if searching by address but Its not working if I search by the post's name/...
0
votes
1answer
19 views

Getting click on item to open closest relevant element (popup) with jQuery

Using the Alerts extension for the WP Job Manager plugin. A list of user-created alerts is presented with some info on each alert. I want to show the info in a popup instead of on the list. Created a ...
0
votes
0answers
48 views

Ajax request not sending to server and returning - wp-admin/admin-ajax.php 400

I have written a jQuery function using jsPDF to convert a form to PDF, I have then added an ajax command with the intention of saving the generated PDF to the server. However, when I click submit, ...
0
votes
1answer
40 views

Convert UL to dropdown list not working

I am running a plugin called Divi Staff to show the staff on the website. I don't like how the specialisms are displayed and wanted to convert them to a dropdown list. I have tried to get this to work ...
0
votes
1answer
20 views

I am trying to load a Js Dynamic Audio Synth [closed]

I saw a working Javascript Piano which I would like to implement on my page as a shortcode. I have already enqueued the Js file, and I can see it when I view my page source. This is how I enquued it:...
0
votes
2answers
32 views

How Do I change Markup of a link in Wordpress

first off, I am sorry if this question has been asked before, don't seem to get it. I would like to change the markup of link in Wordpress to something like this <a href="#" class="s1 s1--top" ...
0
votes
1answer
31 views

How to pass array from jQuery to PHP with AJAX in WordPress?

I have a HTML form with 2 select boxes with multiple selection. I get the selected values on form submit with jQuery and store them in 2 different arrays: $('#assign_categories_form').on('submit', ...
1
vote
0answers
22 views

jQuery is missing in wp-admin

I have downloaded all wordpress project folder from production server. Also changed the website URL to local one and logged in as an admin, but somehow jQuery is missing in wp-admin. What can gone ...
0
votes
0answers
22 views

Magnific Popup with JQuery Flip box slider index/items problem

I'm trying to create a slider after Magnific popup is open with Flipbox slider, Problem I'm facing is that I get all the index elements in the first page, And Flipbox should read each index as a (side)...
1
vote
1answer
68 views

Sending jsPDF documents to the server

I have been doing everything to find a solution but there appears to be nothing evident... I have created a form which requires a signature at the bottom and have created the full form with html and ...
0
votes
0answers
18 views

Add a banner after added to cart

I want to add a banner after the page reaload triggered from the add to cart I dont want to change the add to cart to be ajax but i want that after the refresh a banner will be displayed I tried to do ...
0
votes
0answers
31 views

Download doccument on server rather than clients browser

I have made a form which converts to a PDF using jQuery. I am on a shared hosting package and as a result, cannot add any libraries such as wkhtmltopdf on to the server so in a sense am restricted. ...
0
votes
1answer
34 views

Form validation before submitting

I have a form which converts to pdf on submit. I have added some validation to the form but it does not seem to work. I have tested in Codepen and JSfiddle and the code works fine but on Wordpress it ...
1
vote
1answer
17 views

Woocommerce Moving Review Below add to cart breaks button

Trying to add the reviews on a site below the add to cart button in woocommerce. Both these snippets of code do it: add_action('woocommerce_after_add_to_cart_button', create_function( '$args', '...
0
votes
0answers
11 views

Saving to backend or emaiing instead of saving to browser

I have created a custom contact form which I would like to be converted into PDF as it then holds as a record which I can send to the customer. I am using Javascript to convert the HTML to a PDF, the ...
0
votes
0answers
10 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
61 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 ...
1
vote
1answer
56 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
15 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
28 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
11 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
22 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
48 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
84 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
73 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
44 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', ...