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

How can I add a jQuery OnClick event to the Publish posts button?

I want to add a simple confirmation event to the Publish posts button, so when my client hits "Publish" it will ask him if he's sure, to which he clicks "Yes" or "cancel" and the post then publishes ...
2
votes
3answers
172 views

Loading jQuery With Two Fallbacks

CSS-Tricks suggests this code to load jQuery. However, I'm curious if anybody has done the same thing in functions.php with two fallbacks: the Microsoft hosted jQuery being the first option and ...
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, ...
2
votes
1answer
1k views

Bulk Image upload and one image for each post?

I have around 3000 photos, want to upload on WordPress. Is there any way to bulk upload all the photos as one image for each post ?
2
votes
2answers
615 views

Modify this loop to fit my jQuery slider (slides)

I´m trying to make a slider which takes thumbnails from a certain custom post type and displays for of them for each "slide". I get the slider and thumbnails to work like they should, but I´m unsure ...
2
votes
2answers
1k views

Unable to get_the_content(); of a post in Wordpress via AJAX

I'm trying to ajaxify my Wordpress theme and I use the method described here and I'm now trying get_the_content of post via functions.php. Using jQuery, when I do alert(data) I get the 'title' echo ...
2
votes
2answers
1k views

ajax stopped working when not logged in?

Have had an autocomplete field working for months but has stopped working when not logged in? Not sure when but within the last few days or week (not updated wordpress recently). already have; ...
2
votes
1answer
2k views

Timepicker-addon doesn't show - Datepicker works fine?

UPDATE It seems that it might be a problem with the, $("#opening_time").datetimepicker(); $("#opening_time_end").timepicker(); $("#closing_time_end").timepicker(); If there is a ...
2
votes
3answers
2k views

jQuery AJAX form validation

I am trying to create a custom login page for my site, namely http://localhost/site/login, the problem I am running into now is that when the user tries to log in and enters the wrong username or ...
2
votes
1answer
597 views

WordPress 3.1 not compatible with jQuery Mobile?

I recently updated to WordPress 3.1, and with that update, something very interesting happened. Links became unclickable -- clicking on any link would literally result in nothing happening. ...
2
votes
2answers
119 views

How to correctly add Javascript in functions.php

I would like to remove some ugly looking arrows that are standard on cart buttons in WooCommerce. To achieve this, I found a tip of adding the following code, which should remove the arrows when the ...
2
votes
2answers
256 views

Creating Multiple wp_localize_script for Shortcode?

I have a shortcode that displays recent WooCommerce products in a carousel, however i would like the end user to be able to use the shortcode multiple times on the same page, currently when this ...
2
votes
1answer
540 views

Ajax with jQuery UI dialog not working

I am trying to update my custom database table when changes are made in a dialog box. The script for the dialog box and ajax call is as follows - jQuery(document).ready(function($){ $("td > ...
2
votes
1answer
143 views

How to load some jquery code to make validation in the theme customizer?

i am tring to load some jquery code to make validation in the theme customizer. i have created 10 checkboxes to show some info. but i want to limited the user to choose only 5 checkboxes. so i have ...
2
votes
1answer
731 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
725 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 ...
2
votes
1answer
667 views

jQuery Image Annotation

I'm bascially looking for something that lets visitors to my page comment on photos. When they hover over the photo the image notes will load. Best would be if those notes would also show up in the ...
2
votes
2answers
1k 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 ...
2
votes
3answers
426 views

validate a metabox based on the category that is selected

Ok Let's say I have 2 Categories. If a user select category A, they have to fill in metabox A and similarly for category B, it's metabox B. So my question is, I want to do a validate check, whereby if ...
2
votes
3answers
3k views

jquery UI in wordpress admin

Does anyone have experience with using the jQuery UI plugins in the Wordpress admin area? I´ve been trying to use the datepicker functionality in jQuery UI, but its conflicting with the built- in ...
2
votes
1answer
1k views

Custom post type with file upload - need to “set as field” instead of “send to editor”

I've created a custom post type. It requires a file to be uploaded. I found the following tutorial which I've successfully adapted to do what I need with one exception: ...
2
votes
1answer
144 views

How do I setup nested repeatable option fields?

I'm trying to wrap my head around how to create a set of option fields that should be able to repeat for as many times as possible. But I'm having a hard time to figure out how to proceed. Currently ...
2
votes
1answer
377 views

Refine/Filter WP_Query Posts with jQuery or Ajax

I know this has been asked many many times, but I literally searched for an answer for more than 5 hours without finding anything that drives me in the right direction. What I'm trying to achieve is ...
2
votes
1answer
214 views

Get image URL from media library in input

On wp-admin/post.php?post=447&action=edit for example I have a link and an input. The link appears as follows: <a href="#" class="button insert-media add_media" data-editor="tj_image_url" ...
2
votes
0answers
759 views

“Uncaught SyntaxError: Unexpected token <” in load-scripts.php [closed]

Out of curiosity, I'm implementing AJAX in saving post. I didn't know where to start until I found this Q&A. It looks something I can grab and build on. It works but something on the Wordpress ...
2
votes
1answer
891 views

jQuery Tree View and wp_list_pages

I'm looking to use the jQuery TreeView script on wp_list_pages to get a nice collapsable-tree effect going. The script requires that I add some classes to the list elements such as: <ul id="red" ...
1
vote
2answers
1k views

How to trap “Publish” button to check for meta box validation?

I'm trying to do some form validation on my custom meta box, and I remember somewhere reading about some javascript function to disable/enable the Publish button - except I can't find it. How do I ...
1
vote
2answers
187 views

Why $ for jquery doesn't work?

I used the following to enqueue jquery plugins: <?php function my_scripts_method() { wp_enqueue_script( 'custom functions', get_template_directory_uri() . ...
1
vote
5answers
274 views

What do I need jQuery for?

What do you think of killing jQuery in the public facing WP site? Isn't it useless and making for slower page loading? What's the best way to get rid of it?
1
vote
1answer
92 views

What are best practices for including jquery plugins

I am integrating a wordpress site with another site. The integration consists of a form hosted in wordpress that the user fills out and submits to the other site. I'm using a custom page template ...
1
vote
1answer
359 views

Question about the way that wp_register_script works

Ok so I'm using the Roots Theme for WordPress (https://github.com/retlehs/roots), which, is sort of a starter theme or theme framework. I'm confused about the way that it deregisters the WordPress ...
1
vote
2answers
2k views

WordPress Jquery Fade in, Fade out effect

I'm following a tutorial. I've included the hover.js with the following code: $(function() { // OPACITY OF BUTTON SET TO 50% $(".imgopacity").css("opacity","0.5"); // ON MOUSE OVER ...
1
vote
2answers
5k views

wp_ajax() question.. not using wp_enqueue_script?

hey guys, weird situation... I'm trying to use wp_ajax() for the first time. I'm normally using a normal jQuery ajax request but in my current case I get a lot of bugs so I thought about trying ...
1
vote
1answer
94 views

How do I make sure a plugin loads a script after jQuery

My client has a site running the latest version of WordPress, with Thesis. Currently, jQuery is being loaded in the footer, as the very last script to be loaded. I'm not sure what is causing jQuery ...
1
vote
3answers
344 views

how can I make $ work in wordpress for jQuery?

I have a plugin I want to use, but it depends on the $ identifier, as apposed to using jQuery. Is it possible to enable the $, to save me recoding the plugin? EDIT The plugin automatically adds the ...
1
vote
2answers
802 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
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, ...
1
vote
3answers
3k views

Check if jquery library exist

How to check if jQuery library exist in head tags? <head> <script type="javascript/text" src="http://code.jquery.com/jquery-1.6.2.js"></script> </head> and if not exist how ...
1
vote
2answers
2k views

wp_mail script with jquery post

need to send an email from a page when a form is submitted. Thought i'd use jquery post but not really sure where to start. Would i use wp_mail? And if so how could it be called ? Sorry if that ...
1
vote
1answer
432 views

Showing Author Information and Latest Post by author in lightbox when clicked on the name of the author

I am showing details of all the authors including the avator, Name, Description in my blog. When I click on the OPTIONS TO CONNECT link a lightbox will open and I need to show those details(which I ...
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
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
3k 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
520 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
489 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
545 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
625 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
1answer
73 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 ...