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.

learn more… | top users | synonyms

0
votes
2answers
139 views

Display admin_notice error message form jQuery event

I want to display an admin_notice error message on the custom admin page of my plugin - but I want it to only be displayed from a jQuery event. All of my jQuery is working. I can send data, see ...
0
votes
0answers
34 views

Use data-id for wordpress posts (individually)

I get the filters script implemented on my wordpress web by some developer, who's not good in wordpress functions but he did implement the filter script on web. That script is working on projects ...
-1
votes
2answers
86 views

Trying to prepend a Hashtag symbol to the_tags links [closed]

I want to prepend a hashtag (#) in front of the tags on my post pages in Wordpress using jQuery. This code is not working: $('div.tags a').prepend('#'); This is the php: <div class="tags"> ...
2
votes
1answer
221 views

Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]

What I eventually want to do is when user logged-in to the site, I want to redirect the to the page with all the post created by that user and I want to load them via AJAX request. I have save ...
0
votes
0answers
53 views

Customizer live preview doesn't work

I've added an upload image field to the customizer using the following code: In customize.php: $wp_customize->add_setting( 'header_logo', array( 'default' => '', 'capability' ...
0
votes
0answers
513 views

Insert data into mysql database with php and ajax

I made admin menu inside wordpress and I have form that allows admin to insert some values. I have html: <form id="prices_form" method="post" action=""> <div ...
0
votes
1answer
246 views

Live search from database table

I have wordpress site. I made custom table and sotred values in one row. Now I made admin menu and added input field into it. <input id="location1" type="text" /> I need to predict search ...
0
votes
2answers
90 views

How to get those data using with ajax json?

The following coding is the out come of an other page php echo user_list.php: $myarray=array(); ... ... $myjson = json_encode($myarray); echo $myuser->searchUser($myjson); and the result of ...
0
votes
0answers
23 views

Detect when media select input field has been populated in a plugin

I have some code in a little plugin I am trying to make that allows a user to select an image to use : <input type="text" name="thumbnail_adr" id="thumbnail_adr" class="regular-text" ...
0
votes
1answer
46 views

Loading custom file based on a dependant file that is also dependant on another file

i will start at the beginning. I have a website that is running the Master Slider Pro wordpress plugin and the iLightBox plugin. I am running a custom script in a custom.js file in wordpress child ...
0
votes
0answers
56 views

How to get variable IDs from OOP in jQuery?

I created image widget and tried to use $variable ($this->get_field_id('widget_image') in jQuery. Unfortunately, I cannot get it in jQuery. It shows Uncaught ReferenceError: object_name is not ...
0
votes
0answers
49 views

WP: Using jQuery inside a woocommerce tab

I have a child theme of Storefront which is modifying woo-commerce. The child theme uses the following function in functions.php to enqueue jQuery.UI scripts. function hurrah_enqueue_scripts() { ...
0
votes
0answers
56 views

Wordpress Widget: How to pass $this->get_field_id() to javascript

I would like to pass $this->get_field_id() from widget to jquery. How can I do? Now, I tried to do like this with no luck. var Id = $('.media').attr('id'); console.log(Id); Result: ...
0
votes
0answers
253 views

Is there a way to override Woocommerce's jQuery blockUI?

I know it's possible to make css !important override rules to style the overlay in a limited way, but for true control I've resorted to editing Woocommerce's checkout.js file. I've currently set up a ...
0
votes
0answers
217 views

Gravity Forms loading jquery

I placed the following script in my functions file to deregister Wordpress jquery and use the Google CDN. // use the Google hosted jquery library if (!function_exists('modify_jquery')) { function ...
0
votes
0answers
50 views

How to using a jquery click code triggering the category to load posts

Please i need your help to using a jquery click code triggering the category something like based on the URL or anything do that. For example select the "photography" category on page load ...
0
votes
1answer
26 views

Not getting result using ajax on wordpress

I have used the following code on my functions.php page add_action('woocommerce_product_thumbnails', 'my_ajax_button'); function my_ajax_button() { echo '<button class="buy-this-room myajax" ...
0
votes
1answer
36 views

Refresh widget admin page resetting jQuery hidden class

I am working on Media Upload widget. When I upload image file, it show the image in the admin page. Until I refresh this page, it is disappeared. After I checked, I found that the hidden class is ...
0
votes
0answers
74 views

Trying to update User Meta with Ajax

I am trying to make a plugin to record the users browser based location as user meta data stored as Latitude and Longitude. This current version is trying to make user meta via form, but ultimately I ...
0
votes
3answers
28 views

Why doesn't jQuery use $, and how can I get it do so (GLOBALLY)?

I have a WordPress theme that includes jQuery, but for some reason the "$" doesn't let me call jQuery. I know I can wrap jQuery calls in an anonymous function, but I have other plugins that rely on ...
1
vote
0answers
39 views

Using Javascript to detect keypress event in text editor

I want to bind a javascript function to trigger whenever a user presses a key in the text editor. However it seems that the text editor is an iframe and this is easier said than done. Is there any way ...
0
votes
0answers
72 views

Custom button on admin page doesn't trigger click event

I created a custom button on the "users" admin page. I have a script (loaded correctly) which should register the button click, but it doesn't. I followed an example where they hooked the ...
0
votes
0answers
33 views

Wordpress Custom JQuery Trigger no working on plugin

Experienced web developer here but have never worked with Wordpress. I am having a problem with custom JQuery code. I am trying to trigger an event when a change of selection occurs on a select form ...
0
votes
2answers
43 views

Applying jquery to WordPress admin edit.php

We use the latest versions of WordPress with the Woocommerce plugin. I'm searching for the best way to apply jquery to custom post types such as WC. I have a lot of hooks already for Woocommerce, so ...
0
votes
0answers
46 views

Count comments shows always the count of the first post in the homepage

I have a problem with the "comments count" in the toggle link in my blog: http://www.albertosotophotography.com I have this script (in header.php) for show/hide comments in main page: <script ...
0
votes
1answer
79 views

Autocomplete for titles via ajax - rework of past post away from like_escape()

I'm trying to create an input field that can autocomplete only title from a CPT. They don't have to be linked, they just need to pull titles of a cpt alphabetically and searching from the first ...
0
votes
0answers
24 views

Overwrite Plugin jQuery in Theme/Childtheme JS

I have a Plugin with the following jQuery: //focus search box if specified if(hkbJSSettings.focusSearchBox){ jQuery('.hkb-site-search__field').focus(); } I know I can comment this out, but I ...
1
vote
2answers
112 views

Searching multiple tags and adding jQuery dependant script onto page template?

I have this simple javascript file for checking boxes in a tree view menu: treeview.js $(".acidjs-css3-treeview").delegate("label input:checkbox", "change", function() { var checkbox = ...
1
vote
3answers
135 views

Why isn't jQuery 2.1 loading in the header?

Because I want to use jQuery 2.1 instead of 1.11, I first have to de-register jQuery. Then register it with the new values. : add_action( 'wp_enqueue_scripts', 'add_scripts' ); function ...
0
votes
0answers
79 views

How can I filter through my custom posts with pagination?

Right now I am successfully filtering my posts with my taxonomy terms with jquery so that when you click on a "brand" or a "type" it shows posts that have that taxonomy. My problem here, however, is ...
1
vote
1answer
107 views

TinyMCE 4 remove/add attributes for all images

i want to search for all images that have been add to TinyMCE 4 and: Remove the height attribute from the images Add style="max-width: 100%;" to all images what is the best way to do this tasks? ...
0
votes
1answer
8 views

Adding text to links when not on the homepage

I'm using fullpage.js in a Wordpress theme and on the homepage the main menu links to different sections on the homepage via "#section-1, #section-2" and so forth. Then on other pages the main menu ...
0
votes
1answer
64 views

how to remove/exclude html coding from json file while export?

I have created a file using json and exported it. Its creating HTML tags with it. Actually,I don't want to have that html part to be there in the file. Below I am sharing structure of my current file: ...
0
votes
1answer
18 views

Slider from different widgets

I need some advice. I have added the possibility to pages to have categories with a plugin. I have created a widget for a client that lets a user select a category from a page and select a subpage ...
0
votes
2answers
32 views

Add loggedout class on body using a function or JS

Is it possible to add a class loggedout on the body of every page for all logged out users using a function or JS? My theme already adds a class 'loggedin' for all logged in users.
0
votes
1answer
100 views

Drop Down Category Menu Not Working

If you look on my website, at the top menu under Member's Only, the dropdown menu is not showing the three pages that are listed as sub-pages under the menu category. I know that the back end is fine, ...
0
votes
1answer
363 views

Bootstrap modal with jQuery post

I am trying to create a popup and form with validation, but for some reasonthe process.php is not being found I was told to reclairfy my question. I am using the jQuery below to go to my processing ...
0
votes
0answers
27 views

How do i submit mail without redirection to another file

I am using Bootstrap to add a dialog modal to my page using the following code. <!-- Modal --> <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" ...
0
votes
1answer
24 views

Load different post_thumbnail for smaller window width (jQuery,Wordpress)

Here's the markup in my index.php: <div class="post-thumb"> </div> I want jQuery to put this below code in the div above with the class of "post-thumb" when window's width is less ...
1
vote
0answers
50 views

Change header image loaded by jQuery to use HTTPS

My theme contains a parallax header image. How can I change the URL of the header image so that it uses HTTPS? I want to do it manually. Currently the URL is: ...
0
votes
0answers
106 views

Adding number of items in cart at the beginning of the <title> tag using Javascript

I'm working on a WooCommerce site and I'm trying to add the number of items in the cart, inside of the <title> tag. The thing is: I've been looking for all over the place where the ...
0
votes
0answers
144 views

jQuery slideToggle() element closing when scrolling

I have a Wordpress site that uses Contact Form 7. One of my forms is hidden using jQuery and then to show/hide it I am using an anchor tag and slideToggle(). However, when the form is opened and you ...
0
votes
2answers
27 views

I can't enqueue my scripts - They literally aren't being added to my site

Ok, I've literally copy-pasted different enqueueing code from about 5 different sources (Including wordpress), and not a single one works. Here's the code I'm using in functions.php: <?php ...
0
votes
2answers
165 views

Add `datetimepicker` to form

I have a form where i would like to add a datetimepicker(). I must be doing something wrong. I have done the following: In my header.php <?php wp_enqueue_script("jquery"); ?> In my ...
0
votes
0answers
21 views

Protect my plugins document ready JS from errors from other plugins

I'm creating a plugin where I add some event listeners etc. Nothing fancy. I'm using the document ready event and it's working fine. The only problem is, that other plugins may cause JS errors into ...
0
votes
0answers
23 views

jQuery tab_title already in use

i am fetching data against a cpt in tabs so that when someone hover over a tab its content is shown in below div. now data is being fetched and when hover over tabs data bottom div also shows the text ...
0
votes
0answers
59 views

Add and remove fields

I'am trying make a wordpress widget. It should add an remove field on click, but it doesn't work. Another field will not displays on page. Can you help me please? (sorry for my english, I am not very ...
0
votes
0answers
36 views

Form submissions not posting to database / displaying in dashboard

In the process of building a simple contact form plugin. For some reason - the data from the form submission is not being posted to the database /and or displaying in the WordPress dashboard. If ...
0
votes
0answers
111 views

Querying posts based off a jquery datepicker

I have two jquery date pickers that i'm trying to filter post with. I store the jquery date picker values into a hidden input. Then i'm grabbing them with a php $_POST[]. I'm using meta_query to query ...
0
votes
3answers
194 views

Full width images within post content

The content of the post is contained in a div which is centred in the page and thus any images in the post would be constrained to the width of that div.The image below illustrates what I would like ...