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
3answers
23 views

Include Jquery libraries in wordpress theme?

I have a file in my theme's JS folder named cycle2.js. How do I include the Jquery from 'wordpress→includes' into my theme? How do I load this custom JavaScript file 'cycle2.js' into my theme? I ...
0
votes
0answers
5 views

Nothing works with integration mediamaneger into metaboxes

When I try to put button upload an image nothing happens. what's wrong with this? I put meta-box-image.js into my folder in my theme add_action( 'admin_enqueue_scripts', 'prfx_image_enqueue' ); ...
11
votes
6answers
23k views

How to correctly include jquery-ui effects on wordpress

I've been trying to include the jquery ui effects (more specifically the shake effect) on my wordpress theme. So far, I've only been able to include the jQuery script, but I really have no clue where ...
-1
votes
1answer
15 views

Wordpress crash when insert long html code

i'm going nut.i wrote some code for a wp page, i inserted it into codepen and it works just fine, but the moment i use visual composer "html" snippet, and i copy it inside... wp crash. why? ...
0
votes
1answer
3k views

Accept AJAX call with serialized form data

I'm trying to pass a wordpress plugin some form data via ajax and it works just fine, unless the form data is serialized, then the server responds with an error message. I'm stuck with this for days ...
0
votes
2answers
279 views

Trying to get single posts to load on the front page via ajax

I posted a similar question about this before but I changed a bit of the code so I figured I'd start a new topic. Below is the setup I currently have to load single posts on the front page. This is ...
1
vote
1answer
947 views

Intergrating agile carousel to wordpress: how to write the ajax_callback function

json is totally new to me how to write an ajax_callback function for agile carousel to work in wordpress? Below is the jason data format that I need to write as php arrays for it could be parsed by ...
0
votes
1answer
23 views

click event to unhide something after ajax not firing

I am working in wordpress and my ajax function result showed one button whose html is mentioned below. Now I want to run a click event on that button but when I click it nothing happens. Below is the ...
0
votes
1answer
209 views

Fancybox just loading small white square

I've tried what I could, but cannot get my image to load with the fancybox plugin. The plugin is there, and seems to load, but without the image. Instead I get a small white square on the top left of ...
0
votes
0answers
8 views

Ajax is running my insert query twice

I am working in WordPress and I run a function to insert a row in database with ajax. Ajax runs but for some reason insert operation is performed twice. Below is my code Ajax jQuery(function ($) { ...
5
votes
2answers
3k views

Add custom shortcode button to Editor

Before the new version of Wordpress 3.0 came out I was using this jQuery code below to add custom buttons for my own shortcodes to the editor toolbar in the admin panel, it worked great. However with ...
0
votes
1answer
1k views

“switchEditors is not defined” with wp_editor() in jQuery UI tabs

Making a WordPress plugin, using WordPress 3.5.2 I'm using wp_editor() on the front end, inside jquery UI tabs [ajax loading tabs + 2 editors on the same panel], and I'm getting the following error, ...
0
votes
0answers
14 views

RequireJS in custom theme. Working Example

I try to add to my custom wordpress Theme requirejs because I do not want to use wp_enqueue over and over to inject used plugins and on the other side I do not want to mess the DOM from the beginning. ...
0
votes
1answer
27 views

How to add a custiomized javascipt into a template

I am a newbie of Wordpress. Now I am trying to add my av_s.js file into a Wordpress template, but it seems much more crappy than I expected. I locate the av_s.js file in the js folder under my theme, ...
0
votes
1answer
329 views

AJAX values converted to PHP Variables?

I just started playing with Wordpress and I have a question about the AJAX side of things. I think that I understand how the AJAX front-end to server side processing, back to font-end works. But, I ...
0
votes
0answers
22 views

Pass custom image on add to cart

I'm trying to replicate the behavior that this site has: http://pixers.es/fotomurales/hermosa-mujer-ejemplo-de-la-acuarela-59301559 As you can see you can select a certain portion of the image to buy ...
0
votes
1answer
993 views

using jquery autocomplete in wordpress plugin

I am currently developing a plugin for wordpress, and using jquery autocomplete. In my plugin file i enque autocomplete like this: wp_enqueue_script('jquery-ui-autocomplete'); Then i assign the ...
0
votes
1answer
71 views

Customizing the built-in Media Playlist

I have a simple challenge I can't quite seem to make any progress on: Get the current track (or video) playing and display a link to a transcript of the song. This should be a simple task (and the ...
0
votes
1answer
373 views

Ajax +wordpress onClick link redirect to new page and create html content

i have two pages in my wordpress plugin index.php charts.php in index.php i have some content and some link.. <a onclick="show_trend()" >Trend</a> while clicking this link ,i have ...
0
votes
0answers
22 views

Correct way to write jQuery functions in Wordpress

I'm working with an AJAX based Wordpress template (custom), but I'm having some issues getting jQuery to play nicely. I've enqueued everything (in the right order) and to an extent it does work, but ...
2
votes
1answer
22 views

jQuery cookie not working properly in wordpress

I make my own accordion menu with html + jquery its working perfectly to forth level, then i add a cookie code from net and do some extra work it also work 100% perfectly in html. My complete HTML + ...
0
votes
1answer
658 views

Right way to update widget on dynamic new input field

I have code to add an input field dynamicly in my theme. I have testd it, as a metabox and it works. But, not in a widget. First add and update, that codes work, but when I refresh page or try to ...
0
votes
1answer
659 views

admin ajax php success returns 0

I have looked over many posts on here and other websites and nothing I do seems to work. What I am doing is, I have a custom template file and inside that file I have a div that I want to populate ...
-1
votes
0answers
14 views

WP + Boostrap - How to hide menu after clicking menu item? [migrated]

I am working on website wpweby.cz/sbeauty and it is based on Brew (http://danvswild.com/brew/) which is base on Bootstrap. When you take a look at my website on mobile and you collapse menu and click ...
1
vote
1answer
717 views

Plugin admin page meta_box toggle and order state not saving

I can't get the toggle state and open/close status of meta_boxes on my plugin admin page to be stored. The ajax response is always 0 I'm using meta boxes to hold sections of menu for a plugin. ...
0
votes
1answer
466 views

Add Infinite Scroll to Ajax Loaded Category Query

Update: This has been resolved. See update below. Following a few different online tutorials, I've managed to create a function to modify my post display via Ajax based on a category selected from a ...
0
votes
2answers
884 views

How to add a “ waiting” icon for an ajax in WP frontend?

This is my search js code for processing search : jQuery(document).ready(function($){ $('#searchsubmit').click(function(e){ e.preventDefault(); var searchval = $('#s').val(); ...
0
votes
3answers
586 views

wp_dequeue_script not working in my plugin

There is a theme my client is using. It enqueues many scripts in the admin area of WordPress. I'd like to dequeue these so that my plugin works properly. Commenting out this code wp_enqueue_script( ...
1
vote
1answer
20 views

Add get_option to jquery

I have created a settings page that contains various radio button options for a custom plugin. A radio button I've created is to 'display dots' with the values yes or no. I can get use the value any ...
0
votes
1answer
15 views

Show/Hide text after the first paragraph

How do i create a Show/Hide script after the first paragraph of a text? The idea goes for the_content, where after the first paragraph hide the remaining text with an icon (arrow) and close to reveal ...
0
votes
0answers
12 views

outerHeight not working in wordpress [migrated]

I'm trying to show/hide a reveal and hide it button depending on the height of the div additional-amentites. The removeClass, show and hide are woking but it's not recognising the outerHeight. It ...
1
vote
3answers
6k views

Can't get a JSON object in response to an ajax request with wp_ajax

I have a problem with WordPress and ajax. This is my javascript part (I trimmed it a bit): var posts = $.ajax({ type: 'POST', url: ajaxurl, async: false, dataType: 'json', data: ...
0
votes
0answers
16 views

How can I add an “ALL” button to my list of WordPress categories / sub-categories?

I have a blog in which I am calling the WordPress wp_list_categories and all is working OK. My issue is that I am using the parent <li>s to slideToggle the subs, but need to add an "ALL" ...
0
votes
1answer
495 views

Form isn't inserting data into database with ajax plugin

I've been working at this for weeks without success. I've figured out problem after problem with the code, but none of the corrections seem to fix my core problem. The form doesn't insert anything ...
0
votes
1answer
880 views

Display data on same page as form without refresh

I am not sure if there is something about wordpress, or what I am doing, but I can not get online tutorials to work when implementing in a page template. For example this ...
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
1k views

How do I implement jPanelMenu?

I have serious problems trying to implement jPanelMenu to the theme I'm building. The theme is nearly finished, I'm just trying to figure out this menu and I can finally start using it. Anyways, if ...
0
votes
0answers
19 views

Hide div on click from a custom post type archive [migrated]

I'm having some trouble to achieve this .. . here is my explanation: I have a custom post type archive, On click on on list, I have the postinformation displaying by fadein - which works perfectly. ...
0
votes
0answers
16 views

link-to-custom value when inserting an image with jQyery

I have a dynamic media insert editor implemented using jQuery for dynamic fields. Using jQuery and the global wp object I can insert and grap data to then insert images into my dynamic fields. Using ...
0
votes
1answer
1k views

Infinite scroll page number [duplicate]

On this guys blog he's using infinite scroll and it's appending the page number to the url so when you click on a story and go back, you start off where you were. I'm using infinite scrolling on a ...
2
votes
2answers
694 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
446 views

Javascript/jquery loads super slow (around 6 seconds) which affects only homepage

I got a custom wordpress theme from a developer but he isn't responding to me anymore. Basically my homepage takes ages to load which causes all the elements on the homepage not function until the ...
0
votes
1answer
322 views

Custom meta box with jQuery.sortable custom post type list

What I'm trying to do is have a custom post type ordered differently on different pages. I've searched around for quite a while and can't seem to find anything to help. I have a post type named staff ...
0
votes
1answer
393 views

Save jQuery UI Sortable on Wordpress

I have basic jQuery UI sortable code that works perfectly. I just want the position of each item to save when a user changes it. I am using Wordpress multisite version 3.8.1 and each site will have ...
2
votes
2answers
332 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" ...
0
votes
1answer
24 views

Safe method to temporarily load second jquery library to wordpress

For testing (and completely temporary purposes) I want to load a jquery cdn into my wordpress header.php file. I can't determine if this is possible, and assume I'd need to setup for noconflict, etc. ...
0
votes
0answers
27 views

pass from my php code a value to my jquery file

I want to pass from my php code a value to my jquery file(both in a plugin code). I managed to do it with simple variables with wp_localize_script() but I'm stack with passing class value(that should ...
0
votes
0answers
13 views

jQuery .on() function on iFrame of WordPress Admin

I am trying to execute following code on an iFrame of WordPress Admin while developing a plugin, but it is not working. jQuery(document).on('click', '.subject', function (e) { ...
1
vote
1answer
533 views

Proper way to load a single post via Ajax?

I'm loading single posts via Ajax into a div that I have set up on my index page. Everything is working fine in this regard. I want to use history.js to push/pop the state so if users enter ...
0
votes
1answer
333 views

Dynamic image grid gallery

I want to create a project with the following image grid gallery. I try to do with the using of masonry JQuery My code : functions.php wp_register_script( 'pkgd', get_template_directory_uri() ...