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

Plugin admin page meta_box toggle and order state not saving

I can't get the toggle state and open/close status of meta_boxes on my plugin admin page to be stored. The ajax response is always 0 I'm using meta boxes to hold sections of menu for a plugin. ...
0
votes
1answer
366 views

force jQuery to load in the head

I've written a plugin which uses wp_enqueue_script("jquery"); to load jQuery. I need to load jQuery in the head and not at the bottom of the body. However, I think that this command is overwritten by ...
1
vote
2answers
1k views

Call the content of a page in AJAX in Wordpress

Out of Wordpress, I've made a simple index page wich call the content of 10 other pages thanks to AJAX. Now I need to put this into Wordpress and the AJAX calls don't work at all. I have created the ...
0
votes
1answer
906 views

How to prevent Wordpress from loading the jQuery library at the top of the page

I am developing a site that must be HTTPS secure and Wordpress is loading <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> at the very top of my page, before <html> ...
-1
votes
1answer
146 views

WordPress and jQuery [closed]

I am fairly new to using jQuery in WordPress and I am trying to write jQuery scripts in a separate file. What is the difference between the following two syntaxes of setting up the external file: ...
2
votes
1answer
301 views

How do I rebind event after widget save

I am writing a widget who's form elements have a click event attached to. I bind it using jQuery. However, after clicking save, the bindings gets lost. That is, clicking those elements doesn't ...
0
votes
2answers
2k views

Get selected value with PHP and jQuery

I have form that i'm using to update user profile from front end and i have country select. <form method="post" id="adduser" action="<?php the_permalink(); ?>"> <select id="te" ...
1
vote
2answers
70 views

jQuery breaking my wordpress site

I am including jQuery in my header.php file like this: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script> But when doing this, it breaks my home page ...
1
vote
1answer
605 views

jQuery Ajax() doesn't work when the page is accessed as a WordPress template page

In one file (test_ajax.php) I have a which on change loads another page (registration_form_race_type.php) with a short message via jQuery Ajax(). It works fine when "test_ajax.php" is accessed via its ...
1
vote
1answer
378 views

Move jQuery to the bottom of the page whilst keeping the WordPress jQuery

I wish to move jQuery to the bottom of the page on my theme, to speed up loading times. Previously I was doing this by replacing it with Google's CDN version but I have been told that is a bad thing ...
0
votes
2answers
1k views

Removing jQuery from footer

I am working with HTML5 Blank and I can't seem to get jquery to stop being called in wp_footer(). I have tried adding this to the bottom of my functions file: function ...
0
votes
1answer
285 views

How to setup a popup registeration page in wordpress with function.php

everyone: I wonder if there is existing tutorial on how to create a popup registration page in wordpress by utilizing function.php? or is there another way that can do with it? Thank you!
0
votes
1answer
348 views

JQuery load php - php file without the template

I'm about to start writing a php file that will return a JSON array to be used as a JQuery autocomplete source. I want to create my source.php file that loads without the WordPress template. ...
0
votes
1answer
141 views

Is there some jQuery conflict here?

I'm customizing a wordpress theme called Accordium, and I have decided to add infinite scroll to it using a wordpress plugin called pbd-ajax-load-posts. In the theme, when you click on a post in ...
2
votes
2answers
734 views

Installing jQuery plugin to wordpress theme (Incredible)

Ok so here is the plugin in question I'm trying to integrate it on the homepage of my wordpress theme (incredible bought from themeforest) After reading up on wordpress enqueue script and all that ...
0
votes
1answer
2k views

Override default jquery ui library with newer version

The latest version of jquery ui core fixes a bug that's on my site. The problem is that Wordpress comes with an earlier version. How do I override the default jquery ui core? One solution I've found ...
0
votes
1answer
1k views

Javascript block in Twenty Twelve theme

I am authoring a WP plugin, and I have to generate some JS (jQuery) code in "realtime". It is working fine in general, though I've stuck with one problem with the WP 3.5.1 and its default Twenty ...
0
votes
1answer
343 views

reorder a WP_Query, using a dropdown

I have the following loop used to display posts by category & I would like to to re-order them based on a dropdown selector if (!isset($qry)) $qry = new ...
0
votes
2answers
253 views

jQuery UI inside widget on admin page

I have created a widget that has quite a few settings, and so I am trying to create a tabbed menu (using jQuery UI) inside the widget settings of the admin page. The problem is basically that tabs ...
0
votes
2answers
2k views

Good solution for adding jQuery tabs anywhere within WordPress?

Is there any solution for using jQuery tabs within the native WordPress scripts? If you know of a way to get any method of jQuery tabs working on the frontend and the backend please share your ...
-1
votes
1answer
468 views

best way to communicate between php and jquery/javascript

I have a custom post type "pakket", in which I've put all kinds of data in the taxonomy terms. This custom post type has about 50 items, each with their own values for taxonomy terms. For example: ...
-1
votes
1answer
76 views

jQuery “on” handler does not fire on newly inserted widgets [closed]

I have a jQuery script attached to the widget.php page via an add_action('admin_footer') call. The jQuery executes fine on widget items that were in place when the page loaded. However, on newly ...
0
votes
2answers
44 views

Including Javascript options

For a Wordpress Theme I know javascript files (ending in .js) must be included using wp_enqueue_script in functions.php but how do I include additional javascript code, for example say I need to add ...
3
votes
1answer
555 views

Using Underscore Templates in WordPress

I've noticed that since WP 3.5 that we now have the Backbone.js and Underscore.js libraries included. The new Media Modal uses Underscore templates and I was wondering how would I be able to insert ...
1
vote
1answer
322 views

Ajax pagination works only first and third time

I'm using ajax-based pagination, heres the markup <div id="portfolio-thumbs"> <ul id="portfolio-destaque"> HERE GOES MY LOOP AND CONTENT , some LI's with thumbs and stuff ...
0
votes
1answer
142 views

Thumbnail remove width & height function

I wish that when the browser was resized to below 980px, my images were width 100%. The container of the images already have 100%, the problem is that I'm using wordpress size code for thumbnails: ...
0
votes
1answer
181 views

Weirdness in jQuery supplied with WordPress

I've got a problem with the jQuery supplied with WordPress. The following HTML exhibits this problem: <!DOCTYPE html> <html> <head> <script ...
1
vote
1answer
364 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), ...
0
votes
1answer
311 views

change the icon of a custom post type in WordPress to use twitter boostrap

Using jquery, the icons of WordPress admin menu have been changed to use the twitter boostrap icons, done such as: jQuery('#icon-themes.icon32').replaceWith('<div style="font-size:22px;" ...
0
votes
2answers
239 views

My jQuery is enqueued properly. So why isn't it working?

I'm just trying to add a simple bit of Show/Hide jQuery to a child theme. $(document).ready(function(){ $("#openbtn").click(function(){ $("#openingtimes").toggle(300); }); }); I've saved the ...
0
votes
1answer
138 views

Showing All the Posts in the Loop

this code here <div class="col"> <?php gab_dynamic_sidebar('Subnews1');?> <?php $postnr = of_get_option('of_wn_nr8') + of_get_option('of_wn_nr8a'); if ...
1
vote
0answers
448 views

jQuery Plugin to use Wordpress functions in AJAX request

I'm using Chained Selects jQuery Plugin to create multiple chained selection fields. I'm using the remote version of the plugin to build the related options by means of AJAX request from a separate ...
0
votes
1answer
136 views

Search results load individual post in slide out div

Hi this is more of a solution and advice question. I want to search my wordpress site and load the search results in a very typical way (unordered list with title, image and excerpt). Upon ...
1
vote
0answers
444 views

Post Comments with Ajax in Wordpress

I use this code to post comments with ajax on my WP blog. It works fine but I display the comment form on my homepage so the plugin only works for the first post (first comment form). I want it to ...
0
votes
1answer
2k views

chosen jquery library not loading - is not a function error

I am trying to load the chosen library: http://harvesthq.github.com/chosen/ I am enqueuing a .js file as below: wp_register_script( 'js_custom', plugin_dir_url( __FILE__ ) . 'js/jquery.js', false ); ...
1
vote
3answers
200 views

Plugin jQuery version VS Theme jQuery version: search for best practice

I have built a Wordpress plugin that is based on jQuery and I am using wp_enqueue_script('jquery'); to make it all work. Let say the default version of jQuery loaded by Wordpress is 1.7.2, what ...
0
votes
1answer
597 views

jQuery.accordion isn't a function even when enqueued

I'm trying to implement a jQuery accordion for a client of ours. Basically, it's this tutorial (http://wp.tutsplus.com/tutorials/creative-coding/create-an-faq-accordion-for-wordpress-with-jquery-ui/) ...
0
votes
1answer
135 views

Adding wp_list_categories to a specific div that was appended using jQuery

Due to the way my projects menu is coded/styled I'm having some difficulty figuring this out. I have appended a div to my menu using jQuery, and I want to be able to include an external php file that ...
0
votes
1answer
198 views

FancyBox JS stopped working on multiple sites. Custom plugin responsible. Urgent help needed

First post here so let me know if I'm doing something wrong. The company I work for uses a custom FancyBox Wordpress plugin that allows us to use fancy box on images easily. Basically, when you click ...
1
vote
1answer
689 views

Arrange custom fields with drag and drop?

I am making theme for hotel and i made custom metabox with list of various custom fields that i would need in posts. What i did is i made a list of fields like booking wifienabled coffe pool spa ...
0
votes
2answers
449 views

Add class to <li> based on content of link in <li>

I've added a custom JavaScript file to my header via functions.php and the file is linked fine when I check the source code (listed well below the main call to jQuery). Within the custom JavaScript ...
0
votes
3answers
273 views

How to isolate code to the post edit screen

I've got some jQuery that interacts with items on the post and page editor screens. However, the script is also loading on other admin screens that are driven by post.php Is there a way to target the ...
-3
votes
1answer
129 views

Is it possible to animate the Twenty Eleven menu? [closed]

I have a menu in my Twenty Eleven child theme that has some hierarchical items. Twenty Eleven handles it just fine, of course, but my client likes the fancy-looking menu animation that you can see on ...
0
votes
1answer
1k views

AJAX post into pop-up div

I want to AJAX post content into a pop-up div when I click on the post / page link. I have come up with the following code: Relevant HTML / PHP: <ul class="links"> <?php if (have_posts()) : ...
0
votes
1answer
446 views

Adding Widgets to Masonry Layouts Correctly - jQuery &&|| PHP

I tried incrementally adding in my widget area to the masonry layout (PHP below) it appears but I cannot get it included into the masonry like the other blocks. $counts = 0 ; $addin = ...
5
votes
2answers
528 views

Require featured image

I would like to require a featured image on a site I am developing. I tried the code here: Make featured image required and nothing happened - the JS showed up in the site header, but I could still ...
2
votes
1answer
126 views

javascript is not working on Event Submission?

I am using Events Manager Plugin Javascript is not working on Submit Events Page . I found the reason behind this , that was, I have written a line of code in functions.php to call jquery file. ...
0
votes
1answer
73 views

Security to delete post by Admin

My code is so simple like when admin delete a post by Wordpress fucntion (PHP) and do action with jQuery <?php include('../../../../../../wp-config.php'); if(current_user_can('edit_posts')){ $id = ...
0
votes
1answer
86 views

Wordpress video end function [duplicate]

Possible Duplicate: $ not defined using jQuery in Wordpress I need to trigger a alert box when video ends THis is the code i got from google <script> ...
-1
votes
2answers
52 views

Why I am getting double jquery?

I was doing page analysis from http://www.gtricks.com/google-chrome-tricks/extensions-to-block-sites-in-chrome/">Pingdom and GTmetrix, and I notices that I am getting jquery versions 1.7.2 and 1.8.3 ...