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

1
vote
1answer
62 views

Heartbeat API: How to access data already enqueued?

I'm having problems when trying to access data that I've queued using the Heartbeat API. I'm queuing data using wp.heartbeat.enqueue(). For example: var data = { my_key: 'value' }; ...
1
vote
1answer
381 views

Hide menu item in certain condition

I'm using the plugin qTranslate and I have to hide one menu item when the language isn't Italian. Searching online I created this solutionand applied the solution in this post I created the file ...
1
vote
1answer
647 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" ...
1
vote
1answer
82 views

JQuery not working in my plugin [closed]

This is my first time using JQuery in a WordPress plugin, and I'm having some trouble. Here is my "main" plugin document: <?php /* Plugin Name: Dump-It Scheduler Plugin URI: ...
1
vote
2answers
394 views

Localize variable for multiple Shortcodes

I have this code for flexslider Shortcode add_shortcode('flexslider', function($atts){ global $post; $ids = explode(',', $atts[ids]); $uniqid = uniqid(); wp_enqueue_script( 'shortcode_flexslider'); ...
1
vote
1answer
117 views

How to show a dynamic_sidebar if main content content's height is > a set amount?

I'm looking to add a second dynamic_sidebar to a theme's sidebar.php that will only be displayed if the height of my main content area is greater than a certain amount. If I had some magic hybrid of ...
1
vote
1answer
118 views

How to undo deregister script and use local versions?

The WordPress theme I am using deregisters the jQuery and jQuery UI libraries and registers google-hosted versions instead of the libraries from wp-includes. Here is the code in `functions. UPDATE: ...
1
vote
1answer
88 views

Can't load a class into WordPress post editor's content field

Following to THIS WordPress QUESTION we tried some tweaks and got some nice solutions, hope we can public them after some good active codes-snippets. According to our procedures, we correctly ...
1
vote
2answers
683 views

Make parent category not selectable when it has child categories

I'm trying to find a way of disabling the selection of the parent category within Wordpress 3.5.1 (post editor screen) only when that parent category contains child categories. My structure: ...
1
vote
1answer
1k views

'jQuery is not defined Error' appearing in load-scripts.php

I'm writing this question having already found a solution, in order to see whether other people have encountered this problem. I was having a problem on the back end of a site I am building in ...
1
vote
1answer
404 views

How do I get my page to load the jQuery UI Effects library?

I'm using javascript for the first time to do some simple animations on the home page of my website. So far I have added the following to my header.php file (which is only used for my home page), ...
1
vote
1answer
31 views

jQuery inluclude still seems ncessary for script to work within post

I have a jQuery script that works fine within a WordPress post as long as I include a reference to the jQuery libarary within the post. <script ...
1
vote
1answer
2k views

Making the wordpress login form a jQuery dropdown

I'm using a plugin called sidebar-login to display a wordpress login form (it uses wp_login_form) in my sidebar. However, I feel like it the actual form (textboxes and labels) take up too much space ...
1
vote
1answer
4k views

How can I check email exists via a jquery keyup()?

I have setup a jQuery keyup delay function to check the email typed into an input field. It works fine after testing with an alert('Key pressed!'); But I want it to say, for example, 'Yes this ...
1
vote
2answers
1k views

how to add Jquery script to one page?

What is the best practice to apply an individual script to a particular page? When I try to apply the script of the whole page it has problems with other plug-ins. Is there a rule of thumb? ...
1
vote
2answers
635 views

Load comments per post on click with AJAX

I'm working on a theme that uses a slider to display blog posts. Beneath the slider is a pagination that displays like a timeline, with a date instead of a page number, calling the corresponding blog ...
1
vote
2answers
1k views

wp_verify_nonce not working

I'm working on an ajax request, I have several ajax requests on my functions.php. And all are working, but this: On my php I have this: add_action("wp_ajax_fb_points", "get_fb_points"); ...
1
vote
1answer
467 views

wp_enqueuescript won't load in footer even with true value set?

Below is my code for enqueue my scripts and css. I am trying to get the JavaScripts to load in the footer of my site, but when I view source I see them loading in the header. I suppose the "true" ...
1
vote
2answers
4k views

jquery document ready function not being called [closed]

For some reason I can't get the jquery document ready to fire for my plugin my javascript jquery(document).ready(function($) { alert("hello world"); $("#testdiv").text("hi"); }); the ...
1
vote
2answers
287 views

Unbind postbox click handler

I'm trying to unbind the click handler on post metaboxes so they no longer hide when the handle is clicked. I need to do this because I use the handle to contain <select> elements & when ...
1
vote
2answers
1k views

Combining media queries with image sizes

I have a set of image sizes for WordPress that look like this: add_image_size('1039', 1039, 697); add_image_size('960', 960, 644); add_image_size('800', 800, 537); add_image_size('768', 768, 515); ...
1
vote
1answer
343 views

Firebug : Problem with jQuery in WordPress admin panel

I'm trying to make my first plugin and I have a problem with firebug. When I use firebug console in WP Admin Panel doesn´t work correctly. For example when I use the selector $('#wpbody') the console ...
1
vote
1answer
892 views

Open div inside a custom post-type with Fancybox

I did have a similar problem with this but never managed to find a solution... I have a custom post-type with a number of pages, but what I want to do is grab a particular div from the pages and ...
1
vote
2answers
555 views

Best way to include jQuery and fire with script at bottom of container

I'm going to be using a jQuery slider on my homepage only (not a WP plugin, but a third party). What I'd like to do is include jQuery, the plugin's jQuery script using a .js file, then include the ...
1
vote
2answers
348 views

Include jQuery plugin in Wordpress

Wordpress already comes with jQuery. But what if I want to use a jQuery plugin on the entire blog? What's the best way to include on the entire site? And what if I only want to include it on one ...
1
vote
1answer
7k views

How to load whole Wordpress pages dynamically with AJAX/jQuery like this following website?

This website: http://www.ericpaulsnowden.com (The website is done in Wordpress). Loads pages and posts dynamically with AJAX/jQuery. Does anybody know how to do this?
1
vote
1answer
1k views

Creating custom AJAX requests

My question pertains to where I should create an ajax function that I'd like to call from my page view. I am using a jQuery validator on a custom form that should check the inputted zipcode against ...
1
vote
1answer
4k views

Implementing lazy loading in homepage posts instead of pagination

I have lots of posts in my website. I have used default pagination function for paging the post list in homepage. But I wanted to implement lazy loading instead of pagination just like in twitter. I ...
1
vote
1answer
5k views

How to create a load more post entries like Twitter?

Hey guys, last days i have been trying to figure out how to do that. As read on http://net.tutsplus.com/tutorials/javascript-ajax/create-a-twitter-like-load-more-widget/ but inside wordpress. And i ...
1
vote
1answer
238 views

WP 3.1 upgrade breaks AutoFocus+ theme

I run WP for my photoblog ShutterScape using the awesome theme AutoFocus+. Recently, I upgraded to 3.1 and now, it refuses to show the featured images in the individual post pages. I am suspecting a ...
1
vote
1answer
790 views

Jquery integration with my theme

I want to add a slide side ways jquery to my website, I tried the following code, but seems not to be working Jquery code:- <script ...
1
vote
1answer
2k views

Load created php file data via ajax

Ive been trying to do this for a long time here... First of all, im working with Buddypress latest ver. under WP latest ver. What i want to do, is i want to understand how to call content within a ...
1
vote
1answer
353 views

combining js scripts from a js newb [closed]

I've got a small .js file on my wp site where I have been adding in all of my small js scripts. It works perfectly, but I am stuck trying to figure out how to add in another script. So far jslint does ...
1
vote
1answer
54 views

Loading jQuery UI in the head

I am trying to load jquery-ui-core and jquery-ui-slider in the head of my theme. Here is my code: function load_jquery_ui() { wp_enqueue_script( 'jquery-ui-slider' ); } add_action( ...
1
vote
1answer
29 views

Proper syntax or method for keeping url in modified isotope / category links

I'm setting up a project gallery using isotope jquery plugin for layout and filterability. I've seen examples of how to add a list of category links and modify them to filter on click, but... I want ...
1
vote
1answer
220 views

wpColorPicker: How update colors on input value update?

Setup: An input field that has attached a wpColorPicker instance. An external event that changes the input value color. Issues: On value change the color shown by the colorpicker doesn't get ...
1
vote
1answer
1k views

Multiple images with Media Uploader on front-end

I'm trying to implement a multiple image upload on a frontend form, using the built-in Wordpress Media Uploader. I managed to have a single image upload, but I can't find out how to have multiple ...
1
vote
1answer
42 views

Format numeric symbols in titles

When I add title post as: this - is - post I view code source : this &#8211; is &#8211; post How to format code source as: this - is - post Error: I'm user jQuery UI autocomplete code ...
1
vote
1answer
63 views

Enqueue Wordpress jQuery after it's been deregistered by a plugin

I'm looking after a Wordpress install that makes use of a plugin that deregisters jQuery and replaces it with it's own ancient version. I'm aware of why loading your own jQuery is irresponsible and ...
1
vote
1answer
222 views

How to load jQuery in the footer - nothing works for me

I tried all the solutions I found on the internet, including the ones I found here, but nothing works on my theme - jQuery always load in header. I try to use the one from Google, but I would be happy ...
1
vote
1answer
37 views

Not sure if enqueuing js scripts properly

When I put this code right above the closing of my body tag it works, but when I try to enqueue it, it breaks. I'm thinking maybe jQuery isn't getting called? The snippet is from here FUNCTIONS.PHP ...
1
vote
1answer
1k 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 ...
1
vote
1answer
537 views

How to add fixed position in menu class for Twenty Twelve theme?

I have already looked at many jquery examples on how to make the menu sticky. I have applied these tutorials on clean html pages and they have worked perfectly. However, when I try to apply it on the ...
1
vote
1answer
161 views

Best approach to fetch data from wp options to js file or php file

I am creating my first ever plugin, as I am not a programmer, I have been following tutorials and reading the codex, etc. My plugin consist in showing a notice to users when certain conditions are ...
1
vote
2answers
140 views

ajax, right way to do it and make it works?

I'm new to wordpress but have knowledge in php and javascript. I read a lot of blogs about ajax call in wordpress. I also read some posts on this forum. However, I still have some difficulties making ...
1
vote
2answers
256 views

Ajax Dynamic Archives not showing correct results

Im baffled on why this is not showing the correct results, when selecting the month alone and say 100 posts are on the site, only 3 show up, then if you select the category and month the proper show ...
1
vote
4answers
263 views

Add a class to posts in increments of 2

Is it possible to add specific classes to posts/pages in a query in increments of 2? For example Post 1 Post 2 Post 3 (add custom class) Post 4 (add custom class) Post 5 Post 6 Post 7 (add custom ...
1
vote
1answer
502 views

jQuery Validate wp_editor

I have a form, and in the form, I use <?php wp_editor('', 'user_submitted_progress', $settings = array('textarea_name' => 'user_submitted_progress')); ?> to generate a TinyMCE, rather than ...
1
vote
1answer
694 views

WP_Query with ajax handler returns the same posts

I have a problem that is getting me bald atm. I have a ajax call that handles a loop that handles some querys and returns posts for me. So far so good, but the first time the user sees the page we ...
1
vote
1answer
140 views

Unwanted content in website title

I use "anythingslider" jquery plugin to animate some html content in my wordpress theme. and i use this code in header.php to show title: <title><?php bloginfo('name'); ?> <?php if ( ...