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
394 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'); ...
0
votes
1answer
162 views

Trying to override/intercept a PhotoMosaic gallery link in Wordpress using jQuery

The page in question is located at http://www.sandbarmedia.com/clients/va/gallery/. Basically, I'm trying to use jQuery to intercept a click on one of the photos in the mosaic so that it jumps to the ...
0
votes
1answer
116 views

Do I require the use of nonce?

Im creating a visit/page views counter with ajax,jquery and php, I have been reading a few articles that recommend the use of nonces for data manipulation through ajax, however i am not sure if i need ...
0
votes
1answer
400 views

Thickbox in Plugin settings page?

I adding the default wordpress thickbox in the admin page to show some information inside the div. Everything seems ok when i click that link it appear in popup now <a class="thickbox" ...
0
votes
1answer
67 views

Script dependencies for post.js

I have already got the built in meta boxes displaying on the front, but some of them require the accompanying wp-admin/js/post.js to function correctly. I'd rather not rewrite anything here and just ...
0
votes
1answer
49 views

Customize wp-admin form custom fields

I would like to customize some form elements in my WP admin area: starting from this example (http://api.jquery.com/val/ the one with the select) what I would liko to do, is to update a via a select ...
0
votes
1answer
23 views

Missing items on page

I'm missing items on my web page and I think it is due to some jQuery problems. But I'm not sure and I am unable to find the bug. On this site, on the upper-right corner there is a shopping bag ...
0
votes
0answers
205 views

How to respond with WP_Ajax_Response();

I'm using WP_Ajax_Response(); to respond to some ajax and output it to a div, everything works great. But how exactly do I respond if I want to output some php in to a div? A wordpress loop for ...
-1
votes
2answers
279 views

Adding Custom JQuery Menu Fresh Slide Out

TBH this is my first time doing as adding a custom jquery in a wordpress and i read like about 10-20 articles about it already and more i guess but there still something missing, so i did it like ...
0
votes
2answers
2k views

jquery & ajax sending data to php

In my jquery script I have; jQuery.ajax( ajaxurl, { action: 'lu_ajax', status: 'enabled' }, success: function (a) { alert(a) } In my file.php ...
0
votes
0answers
72 views

Adding javascript files to WordPress and jQuery version

I've been trying to use the recommended method of adding javascript files to WordPress, after reading this http://codex.wordpress.org/Function_Reference/wp_enqueue_script but I'm having a hard time ...
-1
votes
3answers
758 views

Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)

I've searched a lot for this and I seem to get different answers. In my situation, my jQuery function has to use a PHP variable from a different file. How can I accomplish this? Clear and simple ...
0
votes
0answers
88 views

How to read the contents of single post through RSS feed

I am able to fetch the contents of my WordPress site RSS feed through this tutorial on my mobile website. How can I get the contents of a single post through RSS?
0
votes
1answer
512 views

Problem passing id-specific objects to javascript via wp_localize_script

I'm using wp_localize_script to pass multiple arrays of data into a javascript file. To differentiate between the different arrays (and prevent overwriting), they are labelled relative to the post id ...
0
votes
1answer
74 views

jquery issue in functions.php

I am having an issue in a theme that I am working on and I don't see how to fix it. The theme has a few jquery scripts that it needs loaded into the head in order to work. Without all of them, the ...
0
votes
1answer
124 views

JQuery multiple toggle values

I'm trying to hide/show metaboxes dependant on the page template chosen. This has been working fine until I have come to show a metabox on more than one chosen page template. The below code displays ...
1
vote
0answers
334 views

Adding wp_enqueue_media(); causes problem

I want to add the media uploader in the theme options page. If I add following code in the options page, the media uploader works fine there, but it creates problem in the standard posts featured ...
0
votes
0answers
262 views

Jquery UI Datepicker via Ajax call, issue in hiding weekdays dynamically

This is my code: var hideweek; var day; var cloDays = new Array(); function initdatepicker(hideweek){ var splitWeek = hideweek.split("&&"); $.each( splitWeek, function( skey, svalue ...
1
vote
1answer
1k views

Adding Colorpicker Field To Category

I want to add a custom field to my categories where the user can color code them. I've added the field but I want to use built in colorpicker (either tinyMCE or the farbtastic) to give the user an ...
0
votes
0answers
25 views

jQuery child error message

I'm trying to do the following. with jQuery if any/multiple children hasClass e.g '.notvalid' display a single error message e.g 'please double check all fields'
0
votes
1answer
1k views

Using jquery migrate for plugins incompatible with jquery 1.10.2

I'm trying to use a jquery plugin that is not compatable with jquery 1.10.2 in Wordpress 3.6 and was able to fix it by using jquery migrate which apparently also ships with 3.6. I thought I could ...
0
votes
2answers
341 views

JS plugin script loading but not working

I am trying to create a theme using curtains.js but am having a few problems. I have both registered and enqueued the script and the part that would go in the footer like so: ...
0
votes
1answer
260 views

`wp_editor()` CSS messing up the jQuery Dialog

I have a custom admin page that includes both the user of wp_editor() and a jQuery dialog. For reasons unknown to me, the instance of wp_editor() uses some of the same css class names as dialog, and ...
0
votes
2answers
149 views

Hide metabox dependant on page template chosen

I'm using the following JQuery script from this answer to toggle the display of metaboxes dependant on the Page Template selected. The example below shows the featured image metabox when the default ...
0
votes
1answer
168 views

WP Calendar Shortcode not working on my theme

I'm using WP Calendar plugin on my development site. The documentation says that I can use the tag {event_calendar} on my template to render the calendar. This is the code am using on my template ...
0
votes
0answers
58 views

How to pass more information though separate post keys via AJAX

I'm on the admin side of wordpress and therefore am using ajaxurl. Is there any way I can pass information through different keys. For example, like "extra" below... Ajax That's Sending The Data ...
1
vote
1answer
66 views

Ajaxing function in widget class

I want to ajax function declared in function Widget in widget Class ,it have arguments belong to the widget i try this code add_action('wp_ajax_my_func', 'my_func'); ...
0
votes
1answer
87 views

How to localize data array in plugin's option page

So i am localizing data saved in an array for my plugin's options, however the data is only localized in the front end, how can I localize data in the plugin's option page as well? The following is ...
1
vote
1answer
689 views

Ajax load more button in Recent posts widget

I create Recent posts widget and i trying to create load more button for it to get more Recent posts links by ajax ,is there any tutorial for how to make it?
-1
votes
4answers
467 views

jQuery to work on WP custom page template

I have a simple jQuery script to enable an image mouseover hover effect that I want to use on my WP custom page template but it isn't yet working for me and I assume it is not linking to jQuery. The ...
4
votes
1answer
265 views

WordPress: Sortable Metabox Fields Not Saving Position

I've run into a problem that has got me stumped: after upgrading to WP 3.6 my sortable metabox fields are not saving their position when you re-order them. Below is my code: PHP: function save_box( ...
0
votes
1answer
192 views

jQuery does not work on WordPress editor

I've added some content to WP's editor, however the new content does not respond to the click behaviour. Here's how I've added the content: add_filter( 'default_content', 'custom_editor_content' ); ...
0
votes
3answers
1k views

How to load the WordPress jquery in the <head> section

In my WordPress blog I included a javascript-based slideshow at the top which works well. I have a PHP file which outputs the necessary javascript that has to go in the <head> tag by means of ...
0
votes
0answers
167 views

Thickbox not displaying just the image, instead showing full page in lightbox

I have implemented Thickbox into my wordpress theme. I have a regular Wordpress gallery that now has the lightbox when you click on any of the images. When clicked the lightbox shows up. However, ...
-1
votes
1answer
133 views

jQuery issue and wp_enqueue_script

Actually i have one theme with enqueue for insert jquery code and reference for the core and also jquery iu Bus happend things that i don´t understad, actually as i tell until i need insert code for ...
2
votes
3answers
4k views

How to prevent wordpress from loading old versions of jquery in wp_head();?

I noticed my twenty twelve theme is including outdated versions of jquery and js so I want to replace the scripts with the newer versions, however the scripts are in the file included by wp_head() ...
0
votes
1answer
244 views

Why won't the Comprehensive Google Map Plugin load?

all. I could use some help troubleshooting a plugin, since the plugin's author hasn't responding to support threads on the plugin page. I'm using the Comprehensive Google Map Plugin to display a map ...
0
votes
1answer
1k views

PHP and Jquery pass value from form. Update function on DataBase

i do loop foreach: <?php $myrows = $wpdb->get_results( "SELECT * FROM wp_myprojects" ); ?> <form id="aad-form2" action="" method="POST"> <?php foreach($myrows as $a): ?> ...
0
votes
1answer
116 views

Wordpress plugin ajax post parameter

i have problem. I don't know why but my paramters from form don't pass too aad_process_ajax(). My code from functions and jquery: Function with my form: function aad_render_admin() { ?> ...
-1
votes
2answers
745 views

This jQuery snippet doesn't seem to work with Wordpress

I'm not really that much of a jQuery aficionado so I'm not really sure why this little jQuery modal lightbox snippet isn't working. Am I missing any kind of WP specific code? I'm enqueueing the ...
1
vote
1answer
117 views

How to show a dynamic_sidebar if main content content's height is > a set amount?

I'm looking to add a second dynamic_sidebar to a theme's sidebar.php that will only be displayed if the height of my main content area is greater than a certain amount. If I had some magic hybrid of ...
-1
votes
1answer
200 views

Admin Menu new tab external link

In a clients site i needed to add a menu item under the dashboard, this link is to go to a external url. i managed this with the following code: add_dashboard_page( 'redirecting', 'Docs', 'read', ...
0
votes
3answers
1k views

Wordpress Ajax always returns a 404 error

I just got this code from a tutorial. I can't seem to get it to work. HTML (home.php) <form name="myform" id="myform" action="" method="POST"> <!-- The Name form field --> ...
0
votes
0answers
205 views

Add Google Map Stylers to PHP

I would just like to add the following Google Map stylers to my WP maps, but a little lost on where to include in the .twig Here are the stylers: [ { "stylers": [ { "saturation": -100 }, { ...
1
vote
1answer
118 views

How to undo deregister script and use local versions?

The WordPress theme I am using deregisters the jQuery and jQuery UI libraries and registers google-hosted versions instead of the libraries from wp-includes. Here is the code in `functions. UPDATE: ...
0
votes
1answer
474 views

Use Click Image to Play Youtube Video in a Wordpress Loop

Here is my code on Playing Youtube Video when an image is clicked.. The HTML <div id="my-video" style="display:none;"> <div class="responsive-video"> <iframe ...
0
votes
3answers
72 views

Code to check amount of blog posts and add css

Is there any sort of jquery I can use to check if there is only one blog post on the page, then to add custom CSS? And if there is more than one, add different CSS? <div class="main-blog top ...
2
votes
2answers
630 views

Wordpress 3.6 and Accordion UI issues?

Anyone else having issues with WordPress 3.6 and the Accordion UI? I have a website that was working just fine till I updated it to WordPress 3.6. The accordion menu stopped working. No errors. ...
0
votes
1answer
2k views

Fancybox Object has no method error

I already searched related question but most of them are duplicate jQuery lirary, My problem is different coz the website load only one jQuery Library, I am using fancybox for this page's play video ...
0
votes
1answer
109 views

Infinite-Scroll Plugin and Jetpack Infinite Scroll Plugin - Adding to “Thoughts” Theme

How do I enable infinite scroll (either with the infinite-scroll plugin OR the built in infinite scroll jetpack) on the "Thoughts" Wordpress theme? I'm a total noob at editing this stuff so if you ...