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

How can I include JavaScript that use jQuery on admin side

I try this: add_action('admin_print_scripts', 'custom_admin_scripts' ); function custom_admin_scripts() { echo '<script type="text/javascript" src="' . get_bloginfo('stylesheet_directory') ...
1
vote
1answer
4k views

How do I make script load after jquery?

function load_my_script(){ wp_register_script( 'my_script', get_template_directory_uri() . '/js/myscript.js', 'jquery' ); wp_enqueue_script( 'my_script', 'jquery'); } add_action('wp_enqueue_scripts', ...
1
vote
3answers
535 views

Bind to WPSetAsThumbnail

is there a way to bind some extra script to the WPSetAsThumbnail function? the function automatically inserts the image into the post's metabox, but what if i wanted to do something else with it? ...
1
vote
1answer
1k views

How do I pass WordPress's get_bloginfo('siteurl') to Jquery?

I'm guessing this is a really dumb question, but I'm far more familiar with PHP/WordPress and I'm just getting started with jQuery so I'm not even sure what to search on. Is there a way to pass the ...
1
vote
2answers
1k views

Jquery conflict

I have been trying and trying to fix jquery issues. i have in my header lots of jquery. I use it for slider and other things that are built into this premade theme. I am unable to add anything that ...
1
vote
2answers
495 views

Get current logged in user under 3.1, re: remove “Howdy”

I use this in functions.php to change "howdy" to "Logged in as...." But now under 3.1 I get "Logged in as Your Profile" rather than "Logged in as <current user>" What needs to be changed so ...
1
vote
1answer
566 views

different template for first and second level custom post page

I have a custom post type, for examle, products. They can be multilevel, like pages, f.e., Products (custom post type) Books |- LOTR |- Sherlock Holmes |- Cooking help |- etc ...
1
vote
3answers
633 views

WordPress Featured Post Slider

Alright, I have almost finished up a clients project in WordPress, but I have hit a wall. I am not really great with jQuery (and I have yet to find a plugin to achieve what they are looking for). The ...
1
vote
4answers
96 views

jquery won't load in footer

I wanted to move jquery to the site's footer, but that doesn't work. I've tried it with the following code. As you can see, I have a couple of another scripts and they load correctly on the footer. ...
1
vote
1answer
255 views

Is it possible to get a theme customizer setting from wp.customize using jquery?

I am wondering if it is possible to directly interop with the wp.customize api to get a value of a theme customizer setting. The way I am doing it now is using ajax to get a response from a php ...
1
vote
1answer
82 views

Cancel jQuery 'noConflict' - is it really unsafe?

I use some external plugins (not wordpress plugins), that use '$', and it's very convenient for me to cancel noConflict mode, by adding this line $=jQuery But I guess they invented noConflict mode not ...
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
252 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
108 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
364 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
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
355 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
512 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
1answer
79 views

What's the point of using Wordpress's built in admin-ajax.php?

I'm trying to understand why using admin-ajax.php is advantageous over doing something like this: add_action ('wp_loaded', 'my_ajax'); function my_ajax() { // Do Ajax, Check $_POST die(); } ...
1
vote
3answers
186 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
73 views

HTML5 Youtube wrapper works in jsfiddle but not in WP?

I've included few file src's and html into my webpage just as shown in jsfiddle. I put the stuff into php file, since wordpress texteditor tends to ruin code. The video doesn't work even in separate ...
1
vote
1answer
82 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
2k 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
259 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
5k 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
644 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
374 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
176 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
363 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
723 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
609 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
570 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
326 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
380 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
42 views

Using shipped version of jquery

Thare are no errors in the JS console. My goal is to use the shipped version of jQuery that Wordpress uses to work with bxslider. According the link shown here, the current version of jquery shipped ...
1
vote
1answer
46 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
213 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
77 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
355 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'); ...