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
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
593 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
116 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
463 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
127 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
602 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
685 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
631 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
420 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
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
199 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
0answers
153 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
1answer
189 views

Hacking TinyMCE for better usability (shortcodes and html)

I'm looking for some theme or plugin examples that showcase ways in which to enhance the usability of editing shortcodes and/or custom html objects that have been inserted into the editor. I know ...
2
votes
0answers
668 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
864 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
174 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
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
5answers
273 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
80 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
341 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
1k 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
3answers
308 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
736 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
359 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
66 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
1answer
2k 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
497 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
890 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
485 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
504 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
611 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
71 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
991 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
2k 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
191 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
349 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
326 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
458 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 ...