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
2answers
2k views

adding the full image path to a wordpress javascript file

I am currently building a WordPress theme where I am using jQuery to append and prepend some ornate images to a h4 tag with a class of beechheader in the page template markup. Before turning the ...
1
vote
2answers
2k views

Enqueue jQuery in WordPress

Building my first theme from scratch in Wordpress 3.4.1, I know Wordpress already has the latest version of the JQuery via Google. I have read about issue's if the script is not called properly, so ...
1
vote
5answers
3k views

How to load a jQuery script last?

How to get this to load last? <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("div.domTip_tipBody").mouseover(function(){ jQuery("#yyy ...
1
vote
1answer
218 views

Mixing Regular Javascript With jQuery in a Plugin

Sorry for a simple question. I'm learning about plugins. I've got some javascript that I want to put in a jQuery file in my plugin. (I've got jQuery and the scripts enqueued, and working fine). ...
1
vote
1answer
107 views

Googles jQuery: Are There Avantages to Using It?

Are there any good reasons to pull Google's jQuery from their servers as opposed to using the one included with Wordpress? I'm confused as to why I might want to use Google's library. Doesn't ...
1
vote
4answers
361 views

Wordpress Ajax not function as I expect… what's wrong?

In functions.php I have: function testajax() { echo "test"; exit; } add_action('wp_ajax_testthisajax', 'testajax'); add_action('wp_ajax_nopriv_testthisajax', 'testajax'); In scripts.js I have: ...
1
vote
1answer
520 views

Enqueuing jQuery in plug-ins

I want to use jQuery in a plugin. In functions.php of the theme I'm using, I found: if(!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', ...
1
vote
2answers
4k views

How to enable the content editor as a droppable target with jQuery-ui?

I'm trying to enable the WordPress content editor as a droppable using jQuery UI drag and drop. However, I can't get the drag to drop, or the drop event to fire. Is there something I'm missing? ...
1
vote
1answer
338 views

Automatic jQuery accordion from header tags

I want it to be fairly easy for the post author to setup an accordion, based on header tags. So for example this: <h3>Headline 1</h3> <p>Content.. lorem ipsum</p> ...
1
vote
3answers
1k views

Best approach for loading a sidebar Only if the screen max-width is >900px?

I have been playing around with media queries quite a bit lately and I love the concept. It is so easy to display images or change div floats depending upon what the users screen max-width is. I'm ...
1
vote
1answer
479 views

Toggle Sidebar Display

I'm developing a WordPress theme that allows users to toggle the visibility of the sidebars using Javascript in the same way that wikis allow users to show or hide a table of contents. When a user ...
1
vote
2answers
351 views

Is it worth updating WP admin to jQuery 1.5?

I read that jQuery 1.5 has just been released. Do you think that replacing version 1.4.2 with this new release is worth in terms of pure performance (on the admin side because my current theme does ...
1
vote
3answers
143 views

Loading jQuery and jQuery plugin script files correctly [duplicate]

I am using a ticker jQuery plugin and having trouble loading my script files correctly. If I add the scripts in directly into the theme's header.php file my scripts work correctly. Example: ...
1
vote
1answer
76 views

Why is this Ajax not working?

I'm not sure if I am abusing WordPress and Ajax by doing it this way but WP and Ajax Codex a well as Plugin Development with Ajax do not seem to be very helpful. I have created the following Ajax ...
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 ...
1
vote
1answer
245 views

Ajax comments not working

I followed a tutorial to 'ajaxify' wordpress comments where it does not reload the page: jQuery('document').ready(function ($) { $('#commentform').each(function () { var commentform = ...
1
vote
1answer
2k views

force enqueue script to be first in order of prominence

I have a few scripts which are being enqueued, the problem is that I want to force the order of prominece to which these scripts are loaded. There is one in particular which is loaded from a plugin ...
1
vote
1answer
2k views

Add a Fancybox automatically to post type “post” images

Currently, on my homepage (which is a list of posts), if you click an image it opens in the same window as a full size image. I'd like to change it so that when a user clicks said image it opens into ...
1
vote
3answers
4k views

Unhook jQuery from WooCommerce via `functions.php`? [closed]

So I am using the http://woothemes.com/woocommerce/ plugin for eCommerce and it's registering jQuery local and conflicting with my default jQuery call from Google CDN. It took a long time but I ...
1
vote
2answers
604 views

Auto-detect javascript errors and warn theme user

This may sound simple, but it's not :) What I want, and most likely many theme developers do (themes that use javascript / jquery), is to warn the theme user that his site has javascript errors. In ...
1
vote
1answer
368 views

enqueue the scripts

I have a template that has been hardcoded in the header and it needs to be Enqueued. I don't know what to do and the template provider is giving me the run around. JQueries won't work because of it. I ...
1
vote
1answer
175 views

Tags in Wordpress 3.2

Why I can't add tags since Wordpress 3.2 ?! Ajax doesn't seem to work... I gonna be crazy. Any help please ?
1
vote
1answer
1k views

Colorbox ajax loading of outside HTML content works perfect on localhost but not on server

I am trying to render content generated by a php file in [jQuery Colorbox][1] through AJAX in my WordPress site. The PHP resides on the same server in the same domain. It works perfect when I run it ...
1
vote
2answers
358 views

Can I make simple global tooltips in Wordpress?

We wish to have ALL external links within a Wordpress site have a simple mouseover tooltip without having to place a title tag or rel or class tag within it. I've tried several methods using the ...
1
vote
1answer
694 views

AJAX Contact Form Issue

I created a contact form for my sidebar that is working perfectly in Chrome but not in IE or FF. I've been staring at it for hours and can't find out what I did wrong. I'm not getting any errors ...
1
vote
2answers
584 views

Including jQuery in Wordpress

I am using the code below to include jQuery in my Wordpress installation. I was previous calling the jQuery file using the standard HTML script but this was causing problems with a Wordpress plugin ...
1
vote
1answer
1k views

Disable Jquery UI post tabs

Hey all, I'm using Jquery UI tabs with the WordPress Post Tabs plugin and it works like a charm. However, I'd like to auto disable or hide tabs that do not have any data. I've worked with Jquery quite ...
1
vote
1answer
3k views

php ajax problem - weird 301 responses!

hey guys, I really really need your help. I have just no idea why that happens. I'm trying to load a wordpress page with the jquery $ajax method. However my browser is crashing all the time when I ...
1
vote
1answer
276 views

modifying a template and adding jQuery to it

There is a page template called "All Bookmarks" for displaying all links grouped by category. I want to modify it 2 ways: each category of links should be collapsible/expandable by clicking on the ...
1
vote
2answers
2k views

Wordpress Jquery Confliction with Plugin

Hey guys, thanks in advance for your help. I've done my research and I'm a bit stumped with this... I'm building a Wordpress website for a client and it is going to have an e-store. I'm using ...
1
vote
3answers
553 views

How to load default scripts included with WordPress correctly?

I want to know the correct way to load existing scripts in wp-includes/js/jquery/ Example I want to load jQuery UI Tabs What I have done for now function sample_exists_code() { echo '<script ...
1
vote
3answers
302 views

Widget “Save” resetting jQuery hidden fields

I have a widget plugin that I've created, that lists about 10 fieldsets. jQuery runs at the beginning and hides and fieldsets that have no values. There are also buttons that allow to "Add" and ...
1
vote
2answers
378 views

Fancy-box Esay wordpress plugin fails to work on Multilingual site

I have a multi lingual site. On the site I want to display youtube movies using fancybox (or any other equivalent solution) The plugin is installed and set. When checked on the He version - all works ...
1
vote
1answer
69 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
74 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
304 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
107 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
101 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
84 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
1answer
820 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
332 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
3k 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
507 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
406 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
3k 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
239 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 ...