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
22 views

Slideshow of posts

I am trying to find a way to achieve the following: -- I have a section in my home page that lists all posts, since i am using bootstrap, i put every post in a 3 col grid, so 4 posts for each line. ...
0
votes
0answers
46 views

JQuery Accordion Menu Widget Expand All on Mobile?

Can anyone tell me how to/if it would be possible to set up this plugin so that when it's being viewed on the desktop, it works as usual (hover to expand) but when being viewed on mobile, the menu ...
1
vote
2answers
280 views

AJAX returns response 0

I'm trying to get user profile values using an AJAX call, but the response is always 0. Here's my PHP: wp_enqueue_script( // Add JS to <head> 'cc-author-change-post-author', ...
1
vote
0answers
205 views

How to populate custom field dropdown box based on prior selection?

I have two dropdown boxes for a search that uses custom fields and I need the second dropbown box to be populated depending on the results of the first box. So far I have: <form role="search" ...
1
vote
1answer
44 views

PHP mixed with some JS code to update Wordpress theme settings

I am working on my first Wordpress Theme but I am facing a little problem in my code. In fact, I have created a little page in the administration to change some settings on my theme and, for example, ...
0
votes
1answer
118 views

After inserting jquery weather code, my responsive menu is lost

Site with issues - http://rheareview.com I have a community news website built on wordpress (multisite). The task was to place a weather feed including current temp including nice weather condition ...
1
vote
1answer
565 views

Masonry and Jetpack Infinite Scroll - overlap issue

I am trying to implement infinite scroll with Masonry on my archive pages on my theme and I have a couple of issues: 1) The "Load more posts" button is hidden behind the initial posts when you first ...
0
votes
0answers
12 views

why jquery never trigger [duplicate]

very simple think it was working before on my other project but now for this. i have no idea why.. i have simple drop down menu in wordpress. made via jquery and css.. actually everything fine... ...
0
votes
1answer
165 views

get content from page through AJAX

I'm using an wordpress theme and I want to load content through AJAX inside a page. I've added this inside my functions.php : function my_ajax_files() { wp_localize_script( 'function', ...
1
vote
1answer
80 views

What are best practices for including jquery plugins

I am integrating a wordpress site with another site. The integration consists of a form hosted in wordpress that the user fills out and submits to the other site. I'm using a custom page template ...
0
votes
1answer
149 views

Does anyone know how to load jquery in the footer?

I have tried every way I know about, and have read about, to move the jquery library to the footer including the following and every possible variation of the following: function add_scripts() { ...
0
votes
0answers
26 views

how to disable inner links in wordpress

i have used jquery accordion menu plugin for site navigation in my wordpress website. in that i like to disable secondary level links for specific main links. i have disabled third level links by ...
0
votes
3answers
243 views

How can I loop into two different DIVS without repeating the DIVs

I am having a little trouble trying to figure out how I can accomplish this: I have a container with two colums in it, a right and a left column. Each column will have 3 posts with a short excerpt ...
0
votes
1answer
113 views

Execution of JavaScript on save post

I got stuck with one problem, can somebody please help.. :) I would like to execute custom JavaScript function before post is saved, and i can't find how to do that. Something like JavaScript version ...
1
vote
1answer
162 views

Enqueue Google CDN jQuery in Footer

I'm trying to enqueue jQuery from Google's CDN and have it called in the footer rather than the header of my theme. Here's my code: wp_deregister_script('jquery'); wp_enqueue_script('jquery', "http" ...
0
votes
2answers
33 views

JS script not being included [closed]

I am trying to enqueue a js file in functions.php but its not working. Following is my code add_action('init','shopswing'); function shopswing(){ if(!is_admin()){ ...
0
votes
0answers
10 views

How to include taxonomy.php from wp-includes the proper way? [duplicate]

I tried including taxonomy.php from wp-includes folder in my custom php script (which is called by jquery) but I get this error: Fatal error: Call to undefined function add_action() in ...
0
votes
0answers
51 views

jQuery loaded in wrong order for non-admin page views only

I am calling /js/gallery_sugar.js with the following block of code in my plugin. It works fine while viewing the pages logged in as admin, but it doesn't seem to be running when I am just viewing the ...
-1
votes
2answers
165 views

Ensure an external javascript file called from plugin is loaded after jquery is called

I am calling a javascript file from my wordpress plugin code using: add_action('init','gallery_sugar_js_init'); function gallery_sugar_js_init() { wp_enqueue_script( 'gallery_sugar_js', ...
0
votes
1answer
78 views

Need To Deregister Scripts Via Functions.Php

Well, I am a little disappointed how difficult Wordpress it makes to deregister scripts. First, I got a list of all handles, so I looked it up and the handle was jquery-migrate I then added this to ...
0
votes
1answer
76 views

The Events Calendar Plugin - List View Background Colour Issue [closed]

I'm trying to look for some help, I've got a WordPress website that I'm working on. I'm using this plugin called The Events Calendar, but in List View, the background keeps showing in transparency... ...
0
votes
1answer
104 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
1answer
142 views

chained drop-down menu for custom taxonomy using chained.js — not quite working

So, Im trying to get a chained select to work to select a state then a city with that state. (2 fields). Here is what Ive got: First my function to create the menu using get_categories(). First ...
0
votes
1answer
101 views

Creating multiple category drop down

I'm trying to figure out on how to create a multiple category drop down to filter different types of post Here is an image of my work in progress ...
7
votes
3answers
188 views

How to modify image editor dialog options on WordPress?

I am trying to hide the Alignment radio buttons for images uploaded to the post content area, but can't figure out how to add a custom CSS or JS file to the Image Editor dialog. I've successfully ...
0
votes
1answer
172 views

jQuery to Create Button to Show/Hide WordPress Comments and to Hide Comments by Default

I am attempting to create a button to show/hide comments in WordPress. I am currently using the following script: <script> $(document).ready(function() { // Get the #comments div var ...
0
votes
0answers
56 views

How to trigger Jetpack's Infinite Scroll before it reaches bottom of page?

Currently, Jetpack's Infinite Scroll loads the next set of posts in two different ways, one is by clicking a link and the other way is when user reaches the bottom of the page. However, I am ...
0
votes
1answer
37 views

How to update scrollbar when using Jetpack's Inifnite Scroller?

for the last couple of days, I have been trying to have a custom scrollbar (jquery+css) while using Jetpack's infinite scroller. What I want is to get rid off the standard scrollbar and use a custom ...
-2
votes
1answer
173 views

Add a class to a menu item depending on a body class

I need to have a class of current-menu-item added to a li with the id of #menu-item-127 if the body class is post-type-archive-team I can do this with jQuery - $(function(){ if ...
0
votes
2answers
158 views

How to Add a .js file Only in one specific Page Dynamically to Head

I need to add some scrips for Google Maps only in my contact page and I do not want to populate it on all pages. I am not willing to create a custom header as well so I was thinking is there any way ...
0
votes
1answer
21 views

Is there some way to refator this jQuery wrapper?

I have a script which looks like this $(function(){ ... Jquery Code in Here }); and I want to wrap it to make it compatible with WordPress. Do I have to do ... (function($){ ...
0
votes
0answers
75 views

Added input box and button with jQuery to the Add New Post page. Clicking/pressing them always reload the page

I am adding a simple pair of input box + button dynamically to the Add New Post page, using jQuery. This is the code in my js file: (function($) { $(document).ready(function() { var ...
0
votes
1answer
35 views

Admin-ajax.php is dying “0” without processing function

I am trying to learn how to process AJAX requests in Wordpress the correct way. To do this I am adapting this tutorial to create a super simple AJAX request to place the ID of a post (from a link) ...
0
votes
0answers
48 views

Embed stock quotes in a lightbox?

Does anyone know of a method to automatically add stock quotes when a company is detected? Good example here (WSJ):
2
votes
1answer
465 views

Ajax with jQuery UI dialog not working

I am trying to update my custom database table when changes are made in a dialog box. The script for the dialog box and ajax call is as follows - jQuery(document).ready(function($){ $("td > ...
0
votes
0answers
111 views

I want to edit an AJAX Wordpress Pagination

I am using this code to be able to load my content using Ajax (loading content without refreshing the page). The code I found fades out the content and fades in the new content. I want to add the ...
0
votes
1answer
73 views

Group posts by weekly or monthly

Is there an easy way to group all WordPress blog posts by Weekly or Monthly grouping. Ideally I do not want the posts to be displayed by grouping in Front Page but would like to add it as an element ...
0
votes
0answers
87 views

jQuery conflict on EDIT POST page - Getting blank White Screen

I have made a button to show up on ADD/EDIT POST page with onClick function to import values and insert to custom fields. My button/script looks like: <script type="text/javascript"> ...
0
votes
0answers
28 views

IE Jquery Access Denied

Below code i am using it to open print window with some html content in some div. This code is working perfectly fine with Chrome and Firefox however when I run it on IE 8,9 it is opening a window ...
0
votes
1answer
38 views

Change CSS for logged in users

In my css i have a hidden div id: #example {display:none;} How can I set this to display:block for logged in users only? I am assuming using Jquery would be the best option here for best ...
1
vote
0answers
108 views

WP UI style within shortcode - Any Suggestions?

I am using the wp-ui Wordpress plugin to create vertical tabbed content. What I want to do is add a span to part of the tab title - to add some additional style, but the shortcode/plugin strips my ...
0
votes
0answers
105 views

How to get styles from iframe in Customizer

I'm trying to get current styles from a live preview when Customizer is loaded to set them in my controls. How can I do that? I was trying in this way: $('#customize-preview ...
0
votes
1answer
672 views

Using wp_ajax and wp_ajax_nopriv hooks

I want to send an ajax request and want to process it if the user is logged in. Therefore I want to use following two hooks, but I am not sure if I am using them correctly. Is it correct to use same ...
1
vote
0answers
93 views

Vanderlee jQuery color picker and WordPress Errors

Has anyone gotten the Vanderlee jQuery color picker to work with WordPress? I'm evaluating color pickers with alpha support for my theme and this one just refuses to work. ...
0
votes
2answers
119 views

Validating custom meta boxes with jQuery results in posts being saved as draft instead of published post

I have a custom post type with a bunch of custom fields. I want to validate the meta box input with jQuery as soon as you press the Publish button. Here's what I have (I left out all my validation ...
0
votes
3answers
91 views

Why not working jquery show() function in wordpress? [closed]

I try create a quick comment form on my wordpress with a link like this: My plan is when you click this link,you get a comment form with jquery show() function, where you can add a comment in ajax. ...
1
vote
1answer
91 views

Add Lightbox To WordPress Native Gallery

Is there a way to check if a gallery is linked to an attachment page or to an image file via jQuery or WP filter? I'm trying to add a lightbox to gallery image that is linked to image file. But I ...
0
votes
1answer
769 views

Accept AJAX call with serialized form data

I'm trying to pass a wordpress plugin some form data via ajax and it works just fine, unless the form data is serialized, then the server responds with an error message. I'm stuck with this for days ...
0
votes
1answer
36 views

Override default options in plugin metaboxes

Imagine you are on a post-new page to add a post, and a metabox added by a plugin has a lot of checkboxes that always need to be checked manually. Here is one of them: <div class="form_item ...
0
votes
1answer
108 views

Append jquery script for each [partners] shortcode with specified values

I'm trying to do a shortcode which will add additional jQuery script to wp_footer. So this gonna be an example shortcode: function partners($atts ) { global $extra_options, $pslider; ...