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
0answers
32 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
40 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
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
3answers
107 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 ...
1
vote
2answers
104 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
1answer
91 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
0answers
62 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 ...
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 ...
1
vote
2answers
2k views

How to add a “ waiting” icon for an ajax in WP frontend?

This is my search js code for processing search : jQuery(document).ready(function($){ $('#searchsubmit').click(function(e){ e.preventDefault(); var searchval = $('#s').val(); ...
0
votes
1answer
59 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
29 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.
10
votes
2answers
12k views

How to Link External jQuery/Javascript files with WordPress

So I'm using Starkers to base my next WP theme on and I've run into a small issue, I was including my own version of jQuery in the header.php file but when inspecting my site using Firebug I noticed ...
0
votes
1answer
97 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
354 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 ...
1
vote
2answers
20 views

AJAX not Working with php as supposed

I am creating a like system in PHP . My code looks like this . <?php class Like_System { private $userid; private $postid; private $user_ko_like_count; private ...
0
votes
0answers
26 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 ...
0
votes
3answers
189 views

How to tell WordPress that jQuery exists on the page to avoid duplicates via wp_enqueue_scripts

To reduce http requests, I'm combining all scripts that my theme uses into a single minified .js file each time theme options is saved. One of the files in this .js is the jQuery library. Rather ...
1
vote
0answers
49 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
97 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
135 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
151 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
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
0answers
17 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 ...
2
votes
1answer
3k views

Adding Colorpicker Field To Category

I want to add a custom field to my categories where the user can color code them. I've added the field but I want to use built in colorpicker (either tinyMCE or the farbtastic) to give the user an ...
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
2answers
1k views

Integrating jQuery Datatables with Editor into wordpress admin

I am trying to integrate jQuery Datables into my Wordpress plugin http://editor.datatables.net/ I have Created a database table CREATE TABLE `id` ( `id` int(10) NOT NULL auto_increment, `first` ...
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
35 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
106 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
1answer
31 views

AJAX Not Working With Wordpress Database properly

I have created a simple like system where user can click on like button and the like count will increase by one . And if he has already liked the button and he like the button again then it will ...
0
votes
2answers
276 views

Passing variable data from external jQuery file to options.php

I'm setting up a plugin that requires passing of a variable from a stand alone jQuery file to options.php. I have (I think) set up the scripts to be used in my plugin file like so: function ...
0
votes
0answers
134 views

Ajax jQuery doesn't work in mobile

I created an Ajax file to send data to my functions.php and then return values to the Ajax file. PC works perfectly, but in mobile, on an iPhone in this case, why is it not working? This is my ...
0
votes
3answers
65 views

How to track clicks

On certain custom post type I would like track when visitor clicks to view for example phone number, website etc. I know I could do this with google analytics but I would also like to save this data ...
0
votes
1answer
32 views

Fire an event after Featured Image selection

I have a requirement to crop the featured image to different sized parts in wordpress. How to fire an event when the featured image is set(not after publishing) on a new post I tried using ...
0
votes
0answers
68 views

Initial load of category jquery

I've succesfully implemented this jquery I found in another thread, using ajax to load different categories.. Problem is that posts are only loaded after a click - i'd like to display one category on ...
0
votes
0answers
97 views

My AJAX requests take 30 seconds to complete

I am a wordpress newbie messing around with a wordpress installation on localhost using XAMPP and I've encountered a weird problem that I can't find any information on. The problem is that every time ...
0
votes
2answers
394 views

Blur.js with WordPress - Enqueued, but server not finding file

So as the title suggests, I'm trying to run blur.js on my WordPress theme. I have enqueued the script in functions.php: function load_oves_methods(){ wp_enqueue_script( 'blur', ...
0
votes
0answers
178 views

Ajax request not working on firefox

myscript.js jQuery(document).ready( function ($j) { $j('#button').on('click', function () { var data = { action: 'time', type: "POST", time_var: 'day', ...
1
vote
2answers
1k views

How to trap “Publish” button to check for meta box validation?

I'm trying to do some form validation on my custom meta box, and I remember somewhere reading about some javascript function to disable/enable the Publish button - except I can't find it. How do I ...
0
votes
1answer
89 views

Change zurb foundation top bar style on.scroll in wordpress theme using jquery and css

I was wondering if someone could help me out. I am currently developing a wordpress theme using foundation framework on a local host and I would like for the top-bar to change styles on scroll using ...
0
votes
1answer
34 views

Duplicate “default” form with jQuery

I have this code: // Add form jQuery('.add-form').click(function() { // "Copy" default form formGroup = jQuery('.form-item').html(); // "Paste" default form ...
0
votes
1answer
236 views

Trying to fix multiple category drop down

I'm having some problems trying to fix my category drop down on the website i'm developing. Basically one drop down filters has "Sort by Location" and the second one is "Sort by Price" The first one ...
0
votes
3answers
4k views

Show success or error messages in Ajax response to Wordpress custom registration form

I have this custom form inside a Wordpress page template <?php if(!is_user_logged_in()) { if(get_option('users_can_register')) { if($_POST){ $username = ...
0
votes
0answers
8k views

Uncaught TypeError: undefined is not a function (shortcode-box)

I have a Wordpress theme that the author is no longer maintaining, and has stopped functioning properly with the update to Wordpress 3.x. Over the past few months, I have been working to resolve the ...
0
votes
1answer
85 views

Can't execute jQuery before my script

I have a very simple JS script called script_1.js sitting at the root level of my twentytwelve-child theme. This script contains only: $(document).ready(function(){console.log("scriptLoaded"); }); ...
6
votes
2answers
5k views

ajaxurl not defined on front end

I am trying to create a ajaxform on the front side. I am using the code jQuery.ajax( { type: "post", dataType: "json", url: ajaxurl, data: ...
1
vote
0answers
47 views

Attempt to change jQuery version caused White Screen of Death

I'm working on a client's WP installation, and I'm attempting to replace the default jQuery library included with WordPress to a newer version. I inserted the following script into the site's ...