A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
1answer
3k views

Ajax Validation for reCaptcha

Background I have a registration form that validates with AJAX using jQuery Validation Engine. The form was created using Theme My Login and contains reCaptcha which I implemented using WP-reCAPTCHA. ...
0
votes
1answer
68 views

How to enqueue some javascript source once per page

I need my plugin to generate the following - once per page: <script type="text/javascript" src="https://<ritc url for js file>"></script> <script type="text/javascript"> ...
0
votes
1answer
45 views

Screen Options JavaScript Code

I want to know, what script drives the "screen options" animation toggle in WordPress. I'm referring to the options menu that slides out when the admin clicks the "Screen Options" link near the ...
1
vote
2answers
701 views

How do I only load js on the post-new.php and post.php pages in admin?

I have some script that is loading in the admin. I only need it to load on the new post and edit posts screens. What is the best way to do this?
0
votes
4answers
92 views

contact 7 plugin stops some pages from working properly

I started to use contact 7 plugin and I'm having a slider and some effects on other images when i activate the plugin they stop working this is the web page http://www.digitalways.com.sa/ I ...
0
votes
1answer
54 views

Plugins not showing up for custom template

I'm customizing the index.php page. I've customized my header.php and footer.php and created the styles for both things. My main index.php page has: <?php /* Template Name: Main */ ?> ...
0
votes
1answer
175 views

Linking wp_enqueue can't find the javascript file (adds “?ver=x.x.x” to the src)

So I'm trying to link in a javascript file the right way, by using this: --functions.php-- function custom_scripts() { wp_register_script('myscript','/backdrop.js',array('jquery')); ...
0
votes
1answer
450 views

Replacing &#038; in JS code on pages

I am needing to remove the &#038; that seems to be replacing my & on my page code. My original code looked like this: ...
0
votes
0answers
62 views

List.js inside WordPress widget

I am trying to implement list.js (http://listjs.com/) inside my WordPress widget, so far with no success. At first I have tried it in a simple index.html file outside the WordPress environment just ...
10
votes
2answers
1k views

Does the functions.php file ever get called during an AJAX call? Debug AJAX

Trying to figure out an issue a fellow programmer is having. I was wondering if the functions.php file get called at all when you do admin side AJAX? I know that when you do an AJAX call a part of ...
1
vote
0answers
109 views

Using window.onload with Ubermenu

I am using a plugin to place this code on specific pages. But it is not firing correctly. Has anyone had experience working with Ubermenu, WP and jQuery? Do I have to call jQuery into my ...
0
votes
3answers
528 views

Theme Customizer not loading JS for live preview

I am currently working on adding options to the theme customizer. For the last two hours I have been trying to get the live preview working and I am trying figure out why my theme isn't loading the ...
0
votes
0answers
94 views

Dont remove comment box when replying to existing comment

When using the WordPress comment system the top Comment Reply box dissapears when I click to reply to any of the existing comments. If I then click cancel it reappears. Is there a way to keep this ...
6
votes
1answer
105 views

API to trigger prompt on leaving page

I have a proprietary plugin that creates a metabox on the edit-post page. When the data managed by the plugin is edited and the user navigates away then we would like the user to be prompted as ...
1
vote
0answers
108 views

Is it possible to enqueue the Youtube API script or does it have to be inline?

The code below is the main part of a function in my functions.php which returns a div and script which ultimately output a youtube API iframe to the template where the code had been called from. At ...
0
votes
1answer
472 views

Move specific javascript to the footer

I have noticed if I move all of my javascript to the footer, some plugins do not function properly, or at all. Is there some code I can add to my functions.php to move specific plugin javascript to ...
-1
votes
1answer
252 views

Javascript 2 elements dependent onclick .toggle [closed]

Hi I have two JavaScript elements for logging into and create an account. They both overlap each-other when the div id is clicked and I need them to hide when the other id is clicked and vice versa. ...
0
votes
1answer
477 views

wp_deregister_script was called incorrectly

So apparently I am now allowed to do the following in the admin, ON my theme options page and only ON my theme options pages: public function load_admin_jquery(){ ...
0
votes
0answers
135 views

wp_register_script stops wp_enqueue_style working

Ambiguous title, yes. Sorry. I am using the roots framework to register scripts and stylesheets. When I include the wp_enqueue_script('main_js'); my style sheets come out as <style media="" ...
0
votes
1answer
393 views

Problem adding MP3 attachments to a jPlayer playlist

I'm trying to get a post's mp3 attachments working with the jplayer plugin (with playlist addon). I have it working for a set number of attachments, but am failing to find a dynamic solution for any ...
1
vote
1answer
996 views

How to Load Plugin JS in theme's footer section

I am working on optimizing my theme so that the load time can be decreased, as of now i have used wp_enqueue_script() to add my custom js file and everything is working fine as expected. One thing ...
5
votes
1answer
964 views

WP 3.5 media manager - how to create a working gallery frame

i am writing a plugin and after hours and hours of searching for any documentation on WP 3.5 media manager i managed to create my custom media frame that is being called when a user clicks on a custom ...
0
votes
0answers
138 views

How can I update options with javascript?

I'm writing a plugin with an admin screen. I have a set of radio buttons to select the tabs on the plugin's admin page. I also have a 'last_tab' option that allows the administrator to pick up where ...
0
votes
1answer
367 views

Load external javascript files

I have some trouble with loading external javascript files inside my WordPress theme. Use the following markup: <script src="<?php bloginfo('template_directory'); ?>/js/jquery-1.8.1.min.js" ...
5
votes
1answer
1k views

Display attachments by ID in a wp.media frame

I'm trying to use the new wp.media uploader frame for an app I'm building. I've read up a lot on other questions, blog posts, etc etc. The code I pasted below is working already quite fine and even ...
2
votes
1answer
219 views

Using get_option() in JavaScript

Previously, I used the get_option() function to get an option in PHP, like this: $width = get_option('my_width'); This is inside a shortcode function. Now, I want to have an option in JavaScript. ...
-1
votes
2answers
464 views

Are you sure popup on Contact Form 7

I have a contact form built with Contact Form 7. What I want to do is when the user hits the submit button to throw up a pop up window with a notice asking if their sure they want to submit the form ...
2
votes
2answers
207 views

javaScript in <head> section of WP API

How do I place the following javaScript in the <head> section of the Wordpress Widgets API menu screen? <script type="text/javascript"> jQuery(window).load(function() { ...
0
votes
1answer
172 views

WordPress Theme - jQuery JavaScript Library Issue

I am having some issues with a couple of plugins which use jQuery/JS i.e. cookie control and a picasa photo gallery. The theme I am using is quite basic and comes with no sliders etc with moving ...
3
votes
2answers
953 views

Pass custom fields values to Google Maps

I am using this script on display google maps on my wordpress site: <head> <script> function initialize() { var mapProp = { center:new ...
0
votes
1answer
990 views

Execute PHP code in Javascript onclick

When a user clicks on the table row, I want to: save a value in the user profile go to a page I am within this loop: <?php $query = new WP_Query(array('post_type' => 'aanvraag', ...
0
votes
1answer
123 views

Expanding / Collapsing Modules in Wordpress Panel

I'm using WordPress 3.3.2. version. I can't able to expand / collapse modules in wordpress panel. I have deactivated all plugins and checked. But no result. If i disable Java Script, it is working ...
1
vote
1answer
68 views

How to implement a JavaScript and CSS file for my WordPress homepage?

I saw this Javascript feature tour file today, and was curious how I would go about implementing it on the homepage of a WordPress site. Ideally, I'd like to add it so it only shows up if and only ...
0
votes
1answer
180 views

Javascript alert appears before <!DOCTYPE> tag

I have wordpress 3.5.1 on Debian Squeeze. Every time before the page loads javascript alert appears with message 2819371938193817109948281937271937 and have to click OK to see the page. I get this ...
0
votes
1answer
115 views

go to home page when i select default in select-box

I'm new for WordPress. I'm using following code, <div id="cat_list"> <?php wp_dropdown_categories(array('show_option_all' => 'Categories') ); ?> </div> And my JavaScript ...
0
votes
2answers
496 views

Failing to load my script files in wordpress! i can't figure out what i'm doing wrong

i have customized my .html as a custom wp theme. i have these scripts in my header.php: <script type='text/javascript' src="scripts/jquery-1.8.2.js"></script> <script ...
0
votes
1answer
279 views

How to setup a popup registeration page in wordpress with function.php

everyone: I wonder if there is existing tutorial on how to create a popup registration page in wordpress by utilizing function.php? or is there another way that can do with it? Thank you!
0
votes
1answer
501 views

Cloudflare's Rocket Loader + Wordpress -> Ignore scripts?

I'm trying to make Cloudflare's Rocket Loader work on my WP site. Everything works fine except for the WP Visual Editor. I followed the advice here but it doesn't work: How do I add custom attributes ...
0
votes
1answer
127 views

Is there some jQuery conflict here?

I'm customizing a wordpress theme called Accordium, and I have decided to add infinite scroll to it using a wordpress plugin called pbd-ajax-load-posts. In the theme, when you click on a post in ...
0
votes
1answer
68 views

What can cause JavaScript and CSS files to be minified?

On one of my client's site, I see that my plugin's JS and CSS files are minified. Trying to identify what causes the files to minify, I tried to deactivate all plugins (except mine), and changing the ...
0
votes
1answer
623 views

Load JavaScript from a post that's loading into Fancybox via ajax

I'm hoping this makes sense. When a user clicks on a post title I'm launching a modal overlay via fancybox, and feeding the associated post content via ajax. However I have a javascript call function ...
0
votes
1answer
1k views

Dynamically changing navigation links (next and previous) via AJAX

In my wordpress site, I have inside the loop of single.php , a select tag in which the options are the posts of the current category returned via a custom query. On changing selected option, I have ...
1
vote
3answers
2k views

theme path in javascript file

I need to include the path to my theme file within a javascript file. How would I go about this? I have already tried: var templateUrl = "<?php get_stylesheet_directory_uri(); ?>"; function ...
0
votes
1answer
92 views

I keep getting Javascript error messages

I think something in my code must be utterly wrong because as soon as I manage to fix one error that I found, the next one pops up. I just managed to solve this problem. Now this error message keeps ...
-1
votes
1answer
63 views

new to javascript - using in <head> instead of functions.php, not loading correctly

Live site. I've decided to incorporate javascript in my new theme; this is my first time doing so and have pieced together what I've down with help of blog posts and forums. I have the javascript ...
0
votes
2answers
230 views

jQuery UI inside widget on admin page

I have created a widget that has quite a few settings, and so I am trying to create a tabbed menu (using jQuery UI) inside the widget settings of the admin page. The problem is basically that tabs ...
0
votes
1answer
139 views

Javascript in wordpress

I have featured images shown for different posts of same category in a page in a specific div. I need to show the whole post related to this image in the same page in another div. I know i must use ...
1
vote
1answer
1k views

What is the Javascript event for an item being added to the cart in Woocommerce?

I can't seem to find this in the docs or through google. So basically I'm just looking for the Javascript event that fires when an item is added to the cart. For some reason my default added to cart ...
3
votes
1answer
546 views

How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?

How would I go about combining multiple CSS files and concatenating my scripts if they're being enqueued as WordPress recommends? My site is pretty slow and would like to optimize for performance.
0
votes
2answers
44 views

Including Javascript options

For a Wordpress Theme I know javascript files (ending in .js) must be included using wp_enqueue_script in functions.php but how do I include additional javascript code, for example say I need to add ...