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
votes
1answer
11 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
14 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
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 ($) { ...
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
0answers
20 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
26 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
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 ...
-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 ...
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 ...
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
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 ...
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
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
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
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
26 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) { ...
0
votes
0answers
9 views

How To Show/Hide WordPress Meta Boxes Fields According to Option Select

I have a select list with values hosts and html5 and 3 custom fields. On select with value hosts 2 fields (Youtube and Vimeo) should appear, and if value is html5 the remain (Embed) should appear. ...
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
0answers
20 views

Enqueue javascript that inserts custom php widget into jQuery-constructed div

What I need done: The mobile menu on the site (let me know if you want to see the dev site, so I don't get marked as spam for posting the link) is loaded by a script that hides the main menu when the ...
0
votes
0answers
6 views

simple custom lightbox failing

I've built a simple lightbox, easy enough with organic pages, I have the code working on codepen and a local file, however the second I throw it in wordpress it isn't working, maybe you guys can help ...
0
votes
0answers
10 views

Fade In/Out Header Isn't Working in Wordpress [duplicate]

The following code works in an HTML file, but doesn't work when I put it into Wordpress, so I'm assuming I'm doing something wrong according to the Wordpress framework. Here's my Code: ...
0
votes
0answers
21 views

Hide navigation menu on page load using jQuery [migrated]

I'm using the theme Divi from Elegant Themes and I am trying to hide the main navigation menu when the page loads. I then would like for the menu to load as I scroll as seen here ...
0
votes
1answer
51 views

jQuery script isn't posting to database

This is a jQuery script I'm working on to post inputs to a database, assuming the user submitting the data is logged in, and hasn't made an existing entry for the item the user is submitting data for. ...
0
votes
2answers
40 views

Why does javascript works only if logged in?

I'm trying to implement a simple script: jQuery(document).ready(function($){ $(window).scroll(function(){ if($(window).scrollTop() >= $('#masthead').outerHeight()) { ...
0
votes
0answers
27 views

How to get attachment id as soon as it is uploaded through media uploader in jquery?

Using jquery, I am trying to get image attachment id of all images requested to upload through media uploader on post edit page or upload.php. Here is what I tried but this works after all images are ...
1
vote
0answers
32 views

Access Customizer widget instance form

On the WordPress admin widgets page there is a known issue with the widget form not being available the first time a widget is added to a widget area. This can be seen in this trac ticket here: ...
0
votes
0answers
46 views

jQuery .find() is not working (right after it DOES work…) in tinymce extension

I am trying ultimately to get a character counter to show up beneath a text area in a form that is generated in a thickbox via jQuery as a TinyMCE extension. Before I work on the code to calculate ...
0
votes
1answer
30 views

Why does deregistering jQuery cause other scripts not to load?

I've inherited a site using the following in functions.php: if ( ! function_exists( 'foundation_assets' ) ) : function foundation_assets() { if (!is_admin()) { ...
0
votes
2answers
140 views

Active class for my flexslider in WordPress

I'm calling images with a wordpress loop to display in a flexslider on the home page. However, the active class for the thumbnails of the slider aren't working in tandem with the slideshow -- I can't ...
0
votes
1answer
133 views

Jquery ajax to custom php file: returning blank data

I created a custom php file, put it in my folder. The files does insert some data to the database to a custom table i created. require wp_path() . "/wp-load.php"; global $wpdb; $favorite_table = ...
0
votes
2answers
60 views

How to run ajax in Wordpress Post?

I am trying to use ajax in wordpress I have two comboboxes in single-meetings.php the second combobox values are based on selection from the first one here is my single-meetings.php <form ...
0
votes
1answer
38 views

wordpress add_action() issue in ajax call

After a hole day finding solution for the issue, i didn't get what is exactly i am making the mistake. Please give your valuable answer for my issue and humble request not to block if you can't ...
0
votes
0answers
30 views

How to specify url for ajax call in wordpress plugin

I want to use ajax form submit in a plugin, the submitted data will be processed by a script saved as handler.php in the plugins folder, how do I specify this in the jquery script, ordinarily ...
0
votes
0answers
21 views

How do I make a themeable jQuery plugin in Wordpress?

I'm writing a plugin in jQuery that I would like it to be customisable in wp-admin and I'm thinking of the best way to do it. For example, if I was writing a slider plugin and I wanted the the arrows ...
0
votes
0answers
28 views

How to use Jquery properly when editing page

I only want to use a simple JQuery in some of my pages, but the code just not working. Here is some of my background. I am using child theme. Under my child theme folder I do only have 3 files: ...
-1
votes
1answer
38 views

How can insert JQuery in Wordpress? [closed]

My question is how I can insert jquery libraries into Wordpress and how can I deal with them. Thank you.
0
votes
0answers
53 views

Retrieve customizer value using ajax or customizer api and print the value in theme

one of my clients have Branches. one located in new york another in los angeles and etc... in the live site we print new york phone and address(from the customizer) as default. what i need is to ...
0
votes
0answers
331 views

Uncaught TypeError: Cannot read property 'ajax' of undefined

I'm trying to show data from a JSON object in the content section of a WordPress website. The following static HTML works like a charm. <!DOCTYPE html> <html> <head> ...
0
votes
0answers
30 views

Create Notification on Top Bar

I want insert to top on wrapper and top wp admin bar, like this: http://getconversion.com/products/gc-message-bar/ but i always fail... Can i use jquery prepend after body? <style> ...
0
votes
0answers
41 views

Make jQuery library load before plugin files in child theme

I'm setting up a site with child theme. I have installed several plugins. But few plugin files (fancybox, jQuery UI files) are loading before the jQuery library. So I am getting this error: undefined ...
0
votes
0answers
32 views

admin-ajax.php is slow [duplicate]

On this site, it usually takes around 5-7 seconds for admin-ajax.php to process and return the response for when the user clicks on the plus icon on project hover. I'm not sure if this is a WordPress ...
0
votes
0answers
33 views

Pulling apart & understanding the WP Admin Menu Flyouts

I need some help, or advice, on [how to] understanding the Admin Menu Flyout submenus. I've narrowed it down to the following key components: ul.wp-submenu This is the actual submenu, used to ...
0
votes
0answers
32 views

Send email in wordpress

I want a functionality to send email in wordpress but what I have tried below code but what I want is that an additional textbox forinstance called "name" is appended to my email ... can be append the ...
0
votes
0answers
61 views

Masonry callback during load

My photography website runs on a masonry layout. Masonry is called in the footer but the images load beforehand, causing it to look fairly messy until the images are completed and masonry is called. ...
0
votes
1answer
62 views

Wordpress Insert not working with ajax

I am trying to enter insert data with form in wordpress and want to use ajax for that. Without ajax it works fine but when I use ajax pressing the submit button gives 0 in result and the data is not ...
0
votes
1answer
37 views

Add a counter for mouseovers (custom field)

I am trying to count mouseovers on the div for each post. The div is inside the loop. I am almost there, I think you might have to just help me correct some mistake. The div and jquery. Notice that I ...
1
vote
1answer
67 views

wordpress count link clicks by ip address

I am building wordpress web site, which will have an option to download zip file from certain custom post type. By clicking on download button, user automatically starts with downloading zip file. ...
0
votes
0answers
24 views

Change php via js, is it possible?

i want to change my headers dynamically ( not in WP admin dashboard ) <div id="Header_wrapper"> <?php if( header_style == 'header-creative' ) get_template_part( 'includes/header', ...
0
votes
1answer
77 views

Remove Yoast jQuery from front end

I would like to remove the following two script and one style tags. They appear to be added by the Yoast SEO plugin, but looking through their plugin files yields nothing promising. Does anyone know ...