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
1answer
1k views

Ajax (jquery) wp_query pagination returns -1

I am currently developing an ajaxified theme for wordpress. I am listing the posts in a particular category, but the pagination returns -1 when clicked. Lets say I set showposts to 3 and a particular ...
1
vote
2answers
1k views

Using Ajax call in jQuery doesn't work in widget

So I'm in the midst of creating a new conversion widget and I'm having some trouble getting the Ajax call to work in my widget. (works perfectly outside of WordPress). The problem at the moment is ...
1
vote
2answers
4k 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') ...
0
votes
1answer
2k views

Displaying custom post-types in a Fancybox div and then linking to them

How could I go about this… I have a portfolio page, created using custom post-types, and on the portfolio page I have a number of thumbnails which I would like to link to each project I add through a ...
3
votes
3answers
958 views

jQuery UI in Admin (Best Practice?)

Maybe someone has prior experience with this, but when I include the jQuery UI 1.8.9 file within my admin_head I break the functionality of the dashboard (i.e. popup for adding featured image, drag ...
2
votes
4answers
4k views

How wp_enqueue_script works?

I am trying to get scripts via wp_enqueue_script();. I have tried this in header but WordPress is not importing any script. I am using like this wp_enqueue_script('jquery'); ...
0
votes
1answer
378 views

Plugins loading multiple copies of JQuery

I'm having issues where multiple copies of jQuery are being loaded onto the page via plugins that require jQuery. I Just want to confirm that if I have 3 plugins active on my page, that all properly ...
0
votes
2answers
197 views

Using jQuery prepend() with file include

I'm working on a plugin that will add a top header bar (similar to the admin bar) directly after the <body> tag to sites. Since this will be used on multiple themes, I can't rely on the various ...
0
votes
1answer
2k views

what does $options = get_option('test_theme'); do?

I'm trying to set up theme options so they save with AJAX, I found this tutorial http://return-true.com/2010/01/using-ajax-in-your-wordpress-theme-admin/ it's calling $options = ...
0
votes
2answers
894 views

Remove swfobject.js in wp_head()

I have gotten rid of the wlwmanifest_link and jquery, since I load it from a compressed version and at the footer, but I can't find a way to get rid of the swfobject.js. This is the code I used to ...
2
votes
1answer
810 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', ...
0
votes
1answer
334 views

this jQuery function works perfect in static html page but not on wordpress

I am using wp_enqueue_script to do this. If I try to do something else lets say popup a dialog, it works but the code below does not. Can someone tell me the problem. thanks. var $j = ...
1
vote
2answers
7k 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 ...
0
votes
1answer
303 views

Loading Images from Javascript on the Front End

I'm getting some 404 errors on image paths in this plugin I'm building. I'm trying to build a plugin that has some Javascript and images (like a close icon and a progress bar) that I want to load on ...
0
votes
3answers
2k views

show custom field content in jquery tabs

I am trying to make a post which will contain several custom fileds. the custom fields should show within jqery tabs. I have already made it in here: ...
0
votes
1answer
1k views

Change Query Arguments (filter) with jQuery/Ajax or PHP?

I have a pretty complex wordpress-site for travelling. There's an "archive-hotels.php", a template for the custom-post-type "Hotels". Inside the CPT is a taxonomy called "City", so we can do this: ...
0
votes
1answer
499 views

Register google jquery gets overwritten by plugin

I'm currently using a plugin, which includes jquery version 1.6.4 like this: function thethe_image_slider_head_scripts(){ wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', ...
1
vote
2answers
207 views

Retrieve post info within AJAX helper function

I have a button within a post which a user can click. Once clicked, an AJAX call is made. My question is, within my PHP AJAX helper function (located in my theme's function.php) how can I retrieve, ...
1
vote
1answer
343 views

Show user info in a hovercard [closed]

I whant to display user info in a hovercard. I use a jquery plugin to for the hovercard. I call my file like this <?php include 'includes/tooltip.php'; ?> and this is my code from tooltip.php. ...
0
votes
1answer
870 views

How to declare/provide file path in JQuery which is emeeded in the Wordpress theme

How to give the source location path in the jquery code, where my file is in cah-new/wp-content/themes/theme_name/includes/func.php and i have to give that path in the jquery code ...
0
votes
2answers
561 views

Add text to metabox input text field from Thickbox

I have a custom post type with a metabox text input area that I want to have a shortcode inserted into from a thickbox when a link is clicked on from the modal window. Using the code below right now ...
1
vote
0answers
252 views

Suggestions for Developing a Flipbook Style Theme? [closed]

I'm currently working on a custom WordPress theme that will be a showcase of several different stories, "books" if you will, that contain individual chapters. I'd like to present each of the stories ...
1
vote
1answer
63 views

what's the best way to add a class to the div with a class of post every 4 seconds using jquery? [closed]

what's the best way to add a class to the div with a class of post every 4 seconds using jquery? <div class="34 post"> <img width="311" height="417" src="#" class="#" alt="newspapers" /> ...
4
votes
1answer
8k 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', ...
0
votes
1answer
468 views

Jquery checkbox -show posts with checked tags

Using jquery, How do I show a checkbox with the list of tags in the sidebar, and only show posts of the checked tag? I cant seem to find this anywhere
0
votes
1answer
521 views

Change jQuery(document).ready to $.delegate in wordpress

I am trying to change: add_action('wp_footer','myscript_in_footer'); function myscript_in_footer(){ ?> <script type="text/javascript"> jQuery(document).ready(function(){ ...
0
votes
1answer
185 views

Need help with adding jQuery script to WP and calling script to page

I've written a pretty simple jQuery script, and I don't know how to call it. It's in its own directory. First, how do I register it, and then how do I enqueue it? I assume that's the order it's done ...
0
votes
1answer
75 views

Help with IF has focus then… statment

in a sidebar I have: <div id="my_id"> [shortcode]</div> It outputs a title that when hovered on drops down to show a menu. When hovering on the title a background color shows up and ...
1
vote
2answers
1k views

cannot drag and drop widgets since wordpress 3.2.1

I recently updated my site to wordpress 3.2.1 automatically. Now I tried to manage my sidebar widgets, and noticed I can no longer drag and drop the widgets around. If I look into my browser-console, ...
0
votes
1answer
68 views

Changing WordPress URL breaks some jquery functions

Old URL: http://www.pillerdesigns.com/foxterrier/ New URL: http://www.foxterrier.com/ Process: copied all files to new server, updated wp-config.php, changed site and WordPress URL in Settings, ...
0
votes
1answer
42 views

Name of JQuery technique used on this site [closed]

What is the effect or jquery plugin used to create the on hover video effect used on this site? http://www.iwc.com/it/collezione/
0
votes
2answers
423 views

Weird issue where form field loses focus to previous form field even with JS disabled

I've never seen a problem like this in my 12 years of working on the web. Even with Javascript disabled (in all browsers, with all users on different computers), a field that gets focus then loses it ...
1
vote
2answers
3k views

Best Way to Include Scripts on a Specific Template Page

This is something that has always confused me and I could use some help. I want to do four things directly above the closing body tag: include jQuery (WordPress version is fine) include a jQuery ...
6
votes
2answers
5k views

How to dequeue a script?

Wordpress has wp_enqueue_script() but not a wp_dequeue_script() function, so what would be the best way to dequeue a script? I'm using LAB.js to load all of my scripts rather than enqueueing them ...
3
votes
2answers
972 views

jQuery in header or footer

From my reading it seems there is a good case for loading scripts like jquery and dependencies into the footer as a preference if possible; however 2 things confuse me which. Firstly the default for ...
0
votes
1answer
831 views

How to change background image from Wordpress Gallery

I am building a custom theme for a client in Wordpress: She wants the background to change when you click on a gallery thumbnail in a post. It must be a solution, that doesn't involve any coding on ...
0
votes
1answer
733 views

How do I get my nav menu to show sub pages?

http://webdesignsalemoregon.com/westernmennoniteschool/ is my website. I've got the top menu which is the one that was in the theme when I started to customize it. It's got a test drop down that ...
0
votes
2answers
4k views

How does one include the JQuery UI plugin to wordpress and enque it correctly in a plugin form?

I have a basic admin top-level plugin I wrote which has a submenu driving a php form with a grid table populated from wp_dbase (from a custom table 'Branches' in it). My installation is a clean WP ...
0
votes
3answers
260 views

Add jQuery function to media button

I have added a custom button to the media actions in a custom theme, function wp_myplugin_media_button($context) { $wp_myplugin_media_button_image = ...
0
votes
1answer
118 views

Loading scripts on a single page plants the script in the footer

I'm using this code to plant a script on a spesific page, it works but inserts the script into the bottom of the page not the top - I'm at a loss to explain why! Is there a way to do this that results ...
0
votes
1answer
137 views

Hiding the media-new.php File URL option via jQuery

As the title says I'm currently having some difficulties hiding the File URL option via jQuery. I've been trying this: // add_action( 'admin_footer-media.php', 'cor_remove_tr_file_url' ); ...
0
votes
1answer
153 views

Ajax request sends url rather than data

I have a very weird error running on my plugin. I am currently developing a plugin that will allow the user to create routes and specific dates for the route. The dates are more or less tickets that ...
0
votes
1answer
1k views

Theme has superfish - how to add supersubs?

I'm using a theme that is using Superfish for the navigation menu. The problem is, if the sub item is too long it will drop underneath, i want to keep the individual menu item's text on one line. Now ...
0
votes
1answer
697 views

WordPress 3.2.1: jQuery is not defined, breaks Admin panel

I've fresh-installed a WordPress 3.2.1 on my server yesterday. Unfortunately, installing 3.2.1 breaks all the jQuery scripts and I can't click on "Collapse menu", "HTML" in the editor, "Fullscreen" - ...
0
votes
1answer
804 views

Ajax page load in wordpress the right way?

I tried something like the following but if the page I'm loading has javascript it's not running because the elements are created after page load. When the javascript is something I wrote I simply ...
0
votes
1answer
1k views

How to use JQuery Marquee in Wordpress?

I'm using <marquee> in my homepage , I want to use jquery marquee instead , I've added script in my header , in usage it says i have to use "$('marquee').marquee(optionalClass);" , how and ...
0
votes
1answer
984 views

How to install Lavalamp jQuery effect in wordpress [duplicate]

Possible Duplicate: wp_enqueue_script isn't connecting my custom js file I am having a heck of a time getting this Lavalamp effect to work on my main menu/navigation. Here is what I ...
1
vote
1answer
419 views

Add X meta box inputs based on form at top of meta box, how to do it right?

I am setting up a meta box that controls the number of ingredients for a recipe. As each recipe will have a different number of ingredients I decided to use a simple text input and button to set the ...
0
votes
1answer
1k views

my example with ajax doesn't work

i'm trying to use ajax with a simple example, i took the example from : http://ocaoimh.ie/2008/11/01/make-your-wordpress-plugin-talk-ajax/ example N°5 (which doesn't work actually as it is) So i'm ...
0
votes
2answers
596 views

How to include this jQuery File in wordpress?

Ok I have this jQuery that I have tested in a static html page and it works fine. How would I include jQuery to work on wordpress in a plugin? So this is the html page. <head> <title> ...