A client side scripting language useful for making interactive web sites
0
votes
1answer
667 views
How do I add custom attributes to javascript tags in Wordpress?
I am looking to enable CloudFlare's RocketLoader feature that enables asynchronous loading of Javascript for my Wordpress site. The problem, however, is that there is one plugin for that I want to be ...
0
votes
1answer
48 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 ...
12
votes
2answers
260 views
Trigger refresh for new media manager in 3.5
I'm trying to figure out how it's possible to 'refresh' the media library in the new media dialogue in 3.5. I'm adding images from an external image library to the WordPress library (via a tab/iFrame ...
0
votes
1answer
105 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 ...
2
votes
1answer
626 views
API JSON Data in WordPress
On the Google developer API page, it talks briefly on retrieving a dynamic list of fonts using JSON/JavaScript.
I was wondering how would I be able to pull the web fonts API into my Wordpress theme ...
0
votes
3answers
99 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
41 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 ...
0
votes
2answers
118 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 ...
-1
votes
1answer
41 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
1answer
138 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 ...
0
votes
1answer
87 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 ...
0
votes
2answers
35 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 ...
0
votes
1answer
534 views
Tab menus with horizontal and vertical tabs [closed]
Has anybody seen more examples of tab menus like the one on this page with horizontal and vertical tabs?
http://www.hmag.com
I need to create a page with tabs where the tabs at the top are the ...
-1
votes
1answer
260 views
Trigger a click on specific link based on the referrer [closed]
I'm working on a WP single page portfolio that loads post content with AJAX. I read that WP doesn't need #! URLs to make it crawlable by Googlebot. If I understand it correctly, since Googlebot won't ...
0
votes
1answer
75 views
Paginated WP_Query doesn't return 404's, even when posts don't exist
I'm currently building a theme for a client, and one of their requirements is endless scrolling on a "Charts" page. They want this to be paginated, and the endless scroll to load the next page below ...
1
vote
1answer
143 views
How do I get my page to load the jQuery UI Effects library?
I'm using javascript for the first time to do some simple animations on the home page of my website. So far I have added the following to my header.php file (which is only used for my home page), ...
0
votes
2answers
129 views
My jQuery is enqueued properly. So why isn't it working?
I'm just trying to add a simple bit of Show/Hide jQuery to a child theme.
$(document).ready(function(){
$("#openbtn").click(function(){
$("#openingtimes").toggle(300);
});
});
I've saved the ...
2
votes
3answers
1k views
How to handle multiple instance of “send_to_editor” js function
Here is what I am doing:
I Added wordpress media upload with iframe popup when a button or link clicked. And with click of insert into post the image url placed on a textbox.
send_to_editor() ...
1
vote
1answer
218 views
Adding wp_ajax to a theme outside functions.php (on specific template page)
I'm doing a function which requires the use of the wp_ajax action.
I've followed this guide to set it up with the differences of adding the requesting the object AJAX file in functions.php and also ...
3
votes
2answers
566 views
Defer Parsing of Scripts
this is my first time to try this "Defer Parsing" thing, and I don't really have an idea how to do it.
Using PageSpeed tool, I found out that one of the reason why my page is loading too slow ...
1
vote
1answer
233 views
How to handle shortcodes when using the JSON API
I'm wrangling a little logic problem:
I'm making a single page WP theme which uses the JSON API for the content and Mustache style templates for the presentation... However, shortcodes? What would be ...
0
votes
0answers
12 views
Am i right to assume that i can't conditionally load a javascript file (or not) based on the used shortcodes and values? [duplicate]
Am i right to assume that i can't conditionally load a javascript file (or not) based on the used shortcodes and values?
like in human language
if shortcode exists in the current post and value is ...
2
votes
1answer
66 views
Archive dropdown styling not applied
I am trying to add a custom dropdown for archives but struggling with couple of mistakes that might be the reason why it doesn’t work.
The CSS only gives my dropdown the width, not the other styles ...
0
votes
1answer
60 views
How to add additional JavaScript code [duplicate]
I'm developing a mobile site and the template I'm using is based off of Jquery Mobile.
In the header.php file, the template I am using is making calls to CDN javascript files:
<link ...
0
votes
1answer
42 views
Can't insert files in other inputs
I'm trying to allow multiple images to be uploaded to the media library where I can then take the URL of the image and insert it into a custom page on the website but for some reason, when I click on ...
0
votes
2answers
103 views
custom page url slug needs illegal ?id=1 for javascript
I have created portfolio page which contains a image-slid-menu for navigation. For an menu item to appear as open, javascript gets instruction like ?id=0 appended to the url. for instance ...
0
votes
2answers
92 views
Is the wp_enqueue method efficient?
I had a quick question regarding how you are supposed to load in scripts with Wordpress. I am developing a theme and I know that the best way to do this is to use the ...
2
votes
0answers
73 views
Continue javascript execution when errors occurs
I use the WP native function wp_enqueue_script() for all my JavaScripts loading both in WP front and back-end so it can handle duplicated calls to the same script and so on.
One of the issues is that ...
0
votes
2answers
334 views
How to modify the paths of js from twentytwelve theme?
<?php wp_head(); ?> from my default wp theme generates
<script type='text/javascript' src='http://example.com/wp-includes/js/comment-reply.min.js?ver=3.5.1'></script>
<script ...
0
votes
1answer
66 views
How to enqueue script based on post category?
I have scripts for various little tools I have made using some js and html. I want the js to load only on specific single posts in side a specific category. I have tried the following code and it does ...
2
votes
1answer
38 views
Handling URLs in WordPress application
We have a web application that we run inside of WordPress in order take advantage of WordPress's authentication. To make this work, we created a template type for our application that simply includes ...
2
votes
1answer
71 views
javascript is not working on Event Submission?
I am using Events Manager Plugin
Javascript is not working on Submit Events Page .
I found the reason behind this , that was, I have written a line of code in functions.php to call jquery file.
...
-1
votes
1answer
41 views
Wordpress video end function [duplicate]
Possible Duplicate:
$ not defined using jQuery in Wordpress
I need to trigger a alert box when video ends
THis is the code i got from google
<script>
...
1
vote
1answer
65 views
Does WordPress Development Mode Exist (with not minified JS)?
A lot of WP JS is minified and therefore it's hard to be analyzed in the Console. Is there any way to have all scripts uncompressed?
0
votes
2answers
476 views
WordPress Carousel Hover Image
I a using an image carousel to display some pictures on my website. The carousel I am using is called: Jcarousellite (http://www.gmarwaha.com/jquery/jcarousellite/). I have the carousel setup, styled, ...
2
votes
0answers
79 views
WP3.5 Media Uploader - how to make it accept multiple images?
I'm wondering how to make WP3.5 media uploader return 2 or more items in attachement? It always runs once even if 2 items are selected. The code:
$('.button').on('click', function(){
var ...
2
votes
1answer
73 views
How to include admin-ajax when loading external javascript
I'm creating a plugin that has some external Javascript and some AJAX calls ... but I don't know the best way to make reference to the admin-ajax.php file since the path requires some input from PHP ...
0
votes
2answers
94 views
Including javascript for a shortcode
I'm creating a plugin that allows a user to use a shortcode. This shortcode depends on a bunch of javascript that needs to be present once the shortcode loads.
I'm having issues trying to decide when ...
0
votes
0answers
88 views
My Wordpress site crashes in IE8 [closed]
I'm working on my first WordPress project and hit upon a really strange problem. The site loads fine in FireFox, Chrome and IE9, but IE8 goes as far as loading the background then freezes/crashes.
I ...
2
votes
1answer
110 views
How do I enqueue(or delay loading of) <script> tags in individual page posts?
My customer has many pages with <script> elements including javascript.
<script src="myscriptforthispageonly.js"></script>
I'm trying to get all scripts to load in the footer ...
2
votes
2answers
327 views
Has anyone used require.js for handling plugin scripts?
I'm starting to refactor the code of my plugin and I'm thinking about using require.js to handle the scripts so that i have a codebase which is more modular and testable. And I'm also planning to load ...
1
vote
1answer
61 views
Get post meta in enqueued js file
I am writing a plugin in which I have a js file. I enqueue it with wp_enqueue_script. In this file I have some functions. The functions are triggered by an onclick event of a button. The button is ...
2
votes
3answers
108 views
How do I only load a plugin js on it's settings pages?
I have a plugin that is conflicting with some default wordpress functions. In the post and page creating/edit areas. I only need my functions on my settings pages. I have the js file loading in admin, ...
0
votes
2answers
300 views
How to Reload the Dashboard After Clicking Update in Quick-Edit?
How can I refresh the wp-admin/edit.php page after a user clicks Update in the Quick-edit form?
0
votes
2answers
66 views
Proper Javascript Implementation
Instead of calling a script from a file, I put a number of my javascripts in a template file called codes.php.
I then call codes.php in the footer by pasting <?php include (TEMPLATEPATH . ...
0
votes
1answer
34 views
Insert specific information to a posts of a predefined category
I want to show some detail information on specific (for e.g. category=3) posts.
Therefore I use the following coding:
function postinfo_head() {
global $post;
$script = <<< EOF
...
0
votes
1answer
114 views
Admin can enter JavaScript - potential security risk?
WP 3.5/TwentyTwelve/Clean install. I try this when login as admin and editor.
I try add reply for first post "Hello World":
<script>alert('XSS')</script><script><</script>
...
0
votes
2answers
273 views
How can I integrate yepnope.js with Wordpress (and plugins)?
To improve my website's loading speed a bit (and to impress the judges--sad reality of the kind of website I'm building, there are judges), I want to implement yepnope.js to load the Javascript ...
4
votes
1answer
155 views
Want image captions to be from img ALT tags not title tags
Okay,here's my challenge. My client doesn't like how when you roll over an image in the gallery a tooltip shows up with the image's descritpion, which is taken from it's title tag. But he still wants ...
0
votes
0answers
50 views
enqueing multiple javascript files [closed]
I am trying to enque multiple javascript files I am using the following code, but only the menu.js and jquery are loading not the jquery.fittext.js
function my_scripts_method() {
...
