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

2
votes
4answers
1k views

Debug whats going on inside a function called from AJAX

I have a link on my post edit page (admin side) that calls up AJAX and jQuery to run a function inside my functions.php page. The link is wired up and calling the jQuery but I can't seem to debug ...
-4
votes
2answers
1k views

Adding jquery using php function

I was turned down with this question because I get a php error and my question revolves around jquery, but when I take out the JQUERY everything works fine. * Again I'm creating a wordpress plugin. I ...
3
votes
2answers
628 views

jquery plugin only in one page/post

Ive seen all the documentation in the codex but I am doing something wrong since it doesnt work! I want to implement this jquery plugin (https://github.com/davidcrawford/typist-jquery) in my welcome ...
0
votes
1answer
240 views

Trying to implement AJAX into my admin pages. Am I improperly enqueue and localizing my scripts?

I'm trying to implement AJAX into my post edit form in order to hook a custom wp function into a link click. So far I've been able to register my custom js file into my admin header. However when ...
0
votes
2answers
4k views

Javascript included but alert() function not working

I've included the javascript by wp_enqueue_script('slider', plugins_url( 'slider.js', __FILE__ ) ); with just a simple $(document).ready(function () { alert("alert"); }); It shows up in the ...
-1
votes
1answer
287 views

how to display post in jquery slider and carousel

ok I'm pretty new to wordpress and the codex seems too complicated for a newbie like me. My homepage has both a slider(which I want it to display 5 latest post) and a carousel(which should display 4 ...
0
votes
1answer
336 views

JQuery prepend a function

I am trying to see where I went wrong with this code. I was trying to prepend the avatar and user meta above the admin menu. I get header already sent messages as well since the code is just right ...
1
vote
3answers
629 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? ...
0
votes
2answers
32k views

How do I Upload/Import Form (Input) Files via. Ajax function?

I keep running into an issue getting the file(s) added/switched to ajax so that the server ajax handler can deal with the rest. How can I get the $_FILES to be passed the same as with the default ...
0
votes
2answers
757 views

How to load previous or next attachment with jquery ?

When i am on the single.php page, i show the first image attachment. then i would like to load the next (and previous) image attachments without reloading the page. so in single.php i started with ...
0
votes
3answers
763 views

Search box with field hidden till drop down selection is made

I have a search widget with a drop down populated with my custom taxonomies. I need one of the other input fields to only show when a certain taxonomy or its children are selected. Before you say ...
0
votes
1answer
366 views

JS Plugin not executing the js correctly. Trying to make all internal links scroll smoothly

all right... I am attempting to create a plugin for my site that adds a js snippet to the head section when a front end page loads. The js is meant to add smooth scrolling to all internal links. ...
1
vote
1answer
3k 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
2answers
6k 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? ...
0
votes
2answers
404 views

Superfish Menu Not Loading

Im currently trying to integrate a superfish menu into my wordpress theme, however it seems to be disappearing. I believe i have coded the js and the css correctly... can someone give me a pointer as ...
2
votes
2answers
3k views

How to control what jQuery version to include, with wp_enqueue_script

I'm using a script that is based on jQuery, so I'm not enqueue-ing jQuery directly, but via passing it in the array of dependent scripts: ...
3
votes
1answer
130 views

What is the best practice for customizing a plugin's JavaScript/jQuery?

Most well written plugins support a safe means for a developer to customize/theme the plugin by copying PHP files to the theme directory and modifying the copies rather than the original plugin file. ...
0
votes
1answer
522 views

Call javascript functions from each page

Is there a plugin that supports calling custom functions that you've created? Like, page A -- I want to call function x $(document).ready(function(){ call_function_x() }); page B -- I want ...
2
votes
2answers
2k views

How do I use Ajax to show the new posts realtime, on the frontpage

Does anyone know how to make new posts automatically show up in the frontpage, with out having to refresh the page. I have a wordpress site with multiple authors and want their new posts to show up ...
0
votes
1answer
4k views

Can't call Javascript function - scope?

I get a method not defined error when trying to call a function loaded with wp_enqueue_script from site.js. I'm guessing it's because of scope caused by the jQuery ready wrappers? How do I get ...
0
votes
1answer
642 views

Loading a post's content, into a div outside the loop, when it's title is selected in a list

I am building a site in wordpress where at a certain part there is a container that has a list of post items (see it as a menu/sidebar), and an empty space where I will load content. When you click on ...
1
vote
2answers
948 views

How to get a value from PHP in Jquery through Ajax

I'm trying to get a value from a PHP function through Ajax and save it in a variable in jquery. The PHP; add_action( 'wp_ajax_mark_as_read', array( &$this, 'readen_color' ) ); public function ...
0
votes
2answers
81 views

wp_enqueue_ scripts

I've searched high and low for the answer - the codex on wp_enqueue_script seems pretty simple. The problem is when I add my custom excerpt script to my functions file, register and then enqueue it ...
1
vote
1answer
419 views

Script for initializing JQuery Masonry for Wordpress

What is the different between this (http://pastebin.com/PX0YB0hy) and (http://pastebin.com/VBqiMHVQ) for JQuery Masonry. Why does the first one work and the second one doesn't. In both cases I used ...
2
votes
2answers
4k views

jQuery UI AutoComplete not working in wordpress?

To use jQuery UI AutoComplete, I loaded the following scripts: wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core'); wp_enqueue_script('jquery-ui-widget'); ...
0
votes
1answer
82 views

Cloning add_settings_field() with jQuery

Is it possible to setup one add_settings_field() in an options backend and then use jQuery clone function on the front end and be able to create multiples of whatever and save that in an array? I've ...
2
votes
1answer
1k views

Gravity Forms not loading under https, jQuery is not defined

I am using Gravity Forms on my Wordpress site, and so far so good. The problem is I have made the page secure (https/SSL), and this is making the form not to work. It looks like the issue is how the ...
2
votes
2answers
967 views

The correct way to call posts with ajax

I'm trying to write an image gallery plugin with jQuery. I'm using jQuerys $.post AJAX method to send and receive info from the relevant post page. Basically I'll be looping through the attachments ...
0
votes
2answers
413 views

include shortcode values in Thickbox form

I have a shortcode that is built using a Thickbox form with various inputs that return the values. This works fine. However, I would like the existing values (if present) to re-populate the form if ...
1
vote
0answers
826 views

How to bind data-src attribute for the image in the post using jquery?

I'm trying to use foresight.js for responsive image in the wordpress blog. For that I have to add the data-src attribute in the place of src in the <img> tag. Or I have to get the url from the ...
0
votes
1answer
116 views

JQuery Issues With Wordpress Theme Interface

I'm having a back-end script issue with a recently installed theme. I took it up with the theme developer, but they are of no help (that's another story for another time). I apologize if this is ...
1
vote
0answers
251 views

jShowOff not showing numeric links, shows 'undefined' instead

I made a content rotator with jShowOff in a wordpress site, and wanted to have numeric links to each slide, that normaly comes by default but somehow shows 'undefined', the only thing i found on the ...
1
vote
1answer
94 views

Are there any scripts, classes, and/or functions built-in to WP for a plugin to export/import its saved data from wp_options?

In WordPress, are there any supported 'script plugins', Classes, and/or a WordPress function that will allow a plugin to use to export/import its own data from the database to a txt/json file? A way ...
0
votes
2answers
593 views

Dynamic WordPress editor in meta box

I created the WordPress editor using wp_editor function dynamically. While i click add more button i just cloned editor and append new editor using jquery. While i am cloning editor i just changing id ...
1
vote
2answers
427 views

Plugin for a text modal box [closed]

I have a contact form with "Accept Privacy Policy" check box. I need to add a link, that will create a modal box displaying the privacy policy. Just like fancy box but for text. I was looking for a ...
0
votes
1answer
2k views

jQuery drop down not appearing for autocomplete/autosuggest

I have set a field to autocomplete/autosuggest but the drop down isn't appearing as I type. I can see the admin-ajax.php requests and the data returned in the Network tab of Chrome Developer Tools so ...
0
votes
1answer
1k views

Trying to get fittext to work in Wordpress

I have the following code in my template page and I have registered jquery and fittext in my theme's functions.php. They are currently showing up in the footer as I set them to. I can set them up in ...
1
vote
1answer
77 views

Ajaxify calendar

I need ajaxify "next" and "prev" links in wordpress calendar for navigation of months, without updating the page. There is some plugins for this - but I call calendar without using widgets - ...
1
vote
0answers
319 views

Validating a cloned/repeatable input (jQuery)

I'm trying to create a repeatable field an upload image input with image preview for my Theme Options page and I have the following: function theme_options_validate( $_POST ){ if ...
0
votes
1answer
388 views

How To Include JavaScript Files Only In Single Posts?

I know that wp_enqueue_script() inserts Javascript files into the WordPress header in the appropriate place. However, I want to include my Javascript in all single posts, ignoring the WordPress home ...
1
vote
0answers
946 views

Uploading PDF using Media Uploader

I have been using a custom code to upload images to Wordpress using custom metaboxes. Here is the code: <script type="text/javascript"> jQuery(document).ready(function( $ ) { var ...
1
vote
1answer
5k 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 ...
0
votes
1answer
1k views

wp_enqueue_script jquery and jquery ui not working

I am using the following script to call my Jquery and Jquery UI as well as a custom-script.js. Currently it works to the point of being able to see the resource in the inspector and the tag's are ...
2
votes
2answers
1k views

Twitter Bootstrap Use Collapse in Custom Post Type

I am using Bootstrap with Wordpress and I want to implement the collapse functionality in the content for single pages of a specific custom post type. I know I could create a shortcode, however, ...
0
votes
1answer
217 views

Pass WP post content to a jQuery plugin (Fancybox)

I'm building a portfolio WordPress. It only displays image thumbnails, with a video element that call the fancybox. In the <a> tags, the attributes have the information for the fancybox to load ...
0
votes
2answers
162 views

“Conflict” with jQuery (or its plugins)?

I've been working on localhost and everything looks fine but then when I uploaded my Wordpress theme online, all of the jQuery plugin functions are undefined! One solution that worked (which I ...
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?
6
votes
2answers
6k views

Enable Submit Comment Without Page Reload (Using Ajax)?

When user writes a comment and hits the submit button, WordPress reloads the page, before the comment is shown to the user. Is there an Ajax-based solution that allows users to submit questions ...
0
votes
1answer
2k views

wp_enqueue_script won't load in header?

Read up on this, and I believe I'm doing everything right. Everything is getting loaded in the footer. Here is my code: function load_kenburns() { if ( !is_admin() ) { wp_register_script( 'kenburns', ...
0
votes
1answer
49 views

displaying the categories post

I have this php code below for displaying the post from the specific categories. <ul id="sliderx"> <?php query_posts('category_name=slideshow&showposts=10'); while (have_posts()) : ...