A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
0answers
6 views

get document title meta using javascript [migrated]

i'm trying to implementing this simple script below, which would display the document title as assigned by wordpress (or an seo plugin) when the browser tab is in focus, and display an altrenate doc ...
0
votes
0answers
23 views

Manipulate all post in the front end with javascript [on hold]

I need to manipulate all post in the front end with javascript, how can i get all the post with ajax?
1
vote
0answers
26 views

Add / Update Custom Fields After Select Pictures in Media Window

I just added a button called Add Slider in Add/Edit Post Page. Here's my code in my functions.php : //Add button to create slider add_action('media_buttons','add_my_media_button',15); function ...
0
votes
1answer
19 views

Why load JS through the CMS framework? [duplicate]

Why are we using anything like wp_enqueue_script at all? or register, etc. Why are we sending Javascript through the PHP subsystem? There are all kinds of incompatibilities and inconsistencies ...
0
votes
0answers
15 views

Referencing js files with roots 7.0.2 [on hold]

A little help needed on roots wordpress theme... Although I am not new to roots as such, clearly things are a bit different since the last couple of updates and I want to take full advantage of the ...
0
votes
0answers
4 views

Getting comment-reply to load

I am trying to get the comment-reply.js script to work, and at the moment I am having problems including it in my pages. Currently, I am using the following in my header.php file: <?php if( ...
0
votes
0answers
10 views

Insert Ajax-based login upon Event Espresso “Add to Cart” link click event [on hold]

Good day, This is my first post to the site, so apologies in advance for being too wordy/vague/etc... I'm looking to get help with a staging site located at http://sbane39-beta.knowarecms.net. I'm ...
0
votes
0answers
19 views

Add tinymce dynamically via Javascript

I'm struggling to add dynamically a tinymce textarea. I added a custom meta box which contains a button that should add a tinymce. As I'm on post/page, I guess I don't need to include any scripts ...
-1
votes
0answers
20 views

AJAX php function won't hook

I don't know why this is happening but I have this code that I am trying to run but I can't get it to hook. $(document).ready(function(){ $("#login").click(function(){ alert( "loaded" ); ...
-1
votes
0answers
19 views

autosaveL10n is not defined [closed]

I have a plugin which is working on all the sites except one, it gives an console error - "autosaveL10n is not defined" and just displaying blank white page on wp-admin/post-new.php. Anyone have some ...
0
votes
1answer
11 views

Quick Edit: Selected Custom Taxonomy Not Refreshing After Save

This seems to be a common problem as it was asked here but I can't seem to fix it on my own installation. I've setup a filter to modify the quick edit button to identify the correct selected value for ...
0
votes
1answer
19 views

jQuery + more won't load in header

We moved jQuery to the footer using the following code: function jquery_enque_fix() { if( !is_admin() ) { // Enqueue so we can grab the built-in version wp_enqueue_script( 'jquery' ); ...
0
votes
1answer
26 views

How to disable specific plugin in mobile version?

I am using wp-cufon plugin , to enable cufon on my site . But I do not want cufon in mobile version . If there is any way to disable that plugin in mobile version or in just disable specific java ...
0
votes
0answers
28 views

Post repeating with infinite scroll

I'm working on this page: http://bit.ly/1ujkiFa I'm creating an infinite scroll of books (wordpress posts). If you see the first row of books is this one: But if you scroll down, after it "loads ...
-1
votes
0answers
52 views

Defer loading of Google Analytics Javascript Code [closed]

The below code is what Google recommends. I placed the code in my footer.php just before the </body> tag (near the bottom of the file) to load my self hosted analytics.js (myga.js) code. This ...
1
vote
0answers
23 views

Override do_item() Function to Add Extra Attribute to Scripts

The WordPress file that do_item() is in can be found here: class.wp-scripts.php Line 142 Line 144 $this->print_html .= "<script type='text/javascript' src='$src'></script>\n"; ...
0
votes
1answer
15 views

How to HTML5 FormData Ajax

How do I use FormData in wordpress ajax ? I am appending files and strings to formdata. var formdata = new FormData(); formdata.append('name', 'This is Name') $.ajax({ url: ...
0
votes
1answer
18 views

Media Playlist Plugin

Alright so recently I purchased an audio player called "Liner" and I am working with it now converting it into a WordPress plugin but the one thing I am having the most problems with is the fact that ...
0
votes
0answers
13 views

What are the ways to include WebGL Shaders in Wordpress? [duplicate]

How are people including WebGL shaders in Wordpress? The most common way to use shaders is to use <script id="shader-fs" type="x-shader/x-fragment"> tags in HTML files. It is problematic to ...
1
vote
1answer
31 views

Is there an earlier hook than login_head or login_enqueue_scripts?

What I have: A basic plugin that enqueues a style-sheet and JavaScript file to modify the log-in forms. The logo, colour scheming and other styles are affected. My problem: As the /wp-login.php ...
0
votes
0answers
3 views

calculating sums for dynamically added form elements [migrated]

I have below form, where each .form-row is dynamically added using jQuery when user clicks on Add New button. My html form (simplified) <div id="total_sum"> <!-- here will show up total ...
1
vote
2answers
197 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
23 views

admin-head-{$page-name} [duplicate]

I wish to load a small jQuery script in the admin page of a custom post. Initially I used the admin_head hook, but from what I've read, this seems to load this script globally across all admin pages? ...
0
votes
0answers
7 views

Encoded email address fails

For years I've used encoded (example http://hivelogic.com/enkoder/) email addresses in my posts and pages. Recently I've found that the current version of WP no longer handles long addresses (example ...
0
votes
1answer
35 views

Wordpress Javascript Widget jQuery Dependency Issue

I am using a local clean install of WP 4.0 en_GB with no plugins. I have been provided with some information to implement a JS widget into my website. <div id="login"></div> <script ...
0
votes
0answers
56 views

Passing JavaScript variable to PHP popup

I have a popup that has a list of people. The user is allowed to select up to 3 people that they would like to compare. I then would like to show them a page that's comparing the 3 people that they ...
0
votes
0answers
19 views

Combine and minify plug-in JavaScript

I am optimizing a themeforest theme that uses several plug-ins that are required and I am actually using, however, to improve page speed I want to combine those files and minify them. I've seen some ...
0
votes
1answer
26 views

JQuery Plugins in Wordpress

I have been able to somewhat piece together how this should be done but I am really struggling with it. I want to use the Table Sorter plugin (http://tablesorter.com) in a custom Page Template to ...
0
votes
1answer
22 views

In post.php how can I remove onbeforeunload?

I am trying to remove the onbeforeunload on post.php but none of the solution I have found online work. I tried: (function() {window.onbeforeunload null;})(); I am using the action: admin_footer ...
3
votes
0answers
145 views

How to resize image on client-side before upload?

I've been using Plupload to resize images on the client side before uploading them to the server. I've implemented a front-end form which lets the user select a file from their computer and submit it. ...
-1
votes
1answer
160 views

W3 Total Cache: Load CSS asynchronously for better PageSpeed score? [closed]

I'm using W3 Total Cache to minify about 15 CSS files, and also to minify 20 JS files and load those asynchronously in the footer. Running my site through PageSpeed gives me the following message: ...
0
votes
1answer
57 views

Add javascript to a woocommerce page template

I have the following code in my functions.php add_action( 'wp_enqueue_scripts', 'dc_datepicker_options' ); function dc_datepicker_options() { if ( is_page_template( 'single-product.php' ) ) { ...
0
votes
0answers
20 views

Getting lightbox to load javascript on custom theme

I have a site where I want to embed videos in a lightbox. I'm using WP Video Lightbox plugin for this, but instead of the video popping up in a lightbox, it just acts as a link to youtube. Here's a ...
1
vote
1answer
98 views

Change in permalink structure made javascript cookie not work correctly

My site needs a mechanism where a user is sent to agreement page when he visits the site for the first time. Once he accepts the agreement, it is saved in cookie. He can browse any page directly after ...
0
votes
0answers
36 views

how to load post content when a post title is hovered using ajax

i have a wordpress blog and i need to make my posts content show up when vistor hover the title of the post on my index page with no need to get into that post , exactlly like in the following site : ...
6
votes
4answers
754 views

Is there a JavaScript API? How to access public and private data in JS?

According to this post there is no built-in JavaScript API for Wordpress. Therefore developers who want to build on AJAX seem to come up all with their own solution which doesn't seem right to me. ...
0
votes
0answers
35 views

Op-tin bar hide sticky header when scrolling the page

As you can see in this link http://marketingilluminated.com/ At the top the op-tin bar hides the sticky header when you scroll in the page. I would like to know if there's a solution to keep them ...
0
votes
1answer
46 views

Is it possible to pass js variable to template file

I have select drop down created in functions.php and in js file getting onchange value of drop down. I want to know do I pass this variable to my template file?? This is my code in functions.php file ...
0
votes
1answer
52 views

How to call plugin path in JS?

I am using wp-store-locator plugin and I want to add plugin directory path to my JS. html = "<li data-store-id='" + id + "'><div><p>" + storeImg + "<strong>" + store + ...
0
votes
0answers
24 views

How can I correctly POST to a Wordpress page?

I'm creating a timetable page for a community-run bus route planner/timetable site, and I'm currently coding a page where the user can select their desired bus from a drop-down list, and then PHP will ...
1
vote
1answer
18 views

Any required callbacks to WP.com or WP.org?

China is blocking both WP.com and WP.org. I would like to know if WP4.0 includes any callbacks or references to files such as javascript libraries located on these domains, because I must plan for ...
0
votes
0answers
22 views

Search box for hierarchical taxonomies in admin interface

When hierarchical taxonomies (like categories) have lots of terms it gets difficult selecting them in the admin interface. A UI solution would be a search-box (like non-hierarchical taxonomies / tags ...
0
votes
1answer
35 views

How does WP determine the difference between a post and a page url

I'm trying to mimic WP routing in a javascript plugin. I've successfully imported the rewrite rules and am applying them to the browser location. But I can't seem to parse the difference between a ...
0
votes
0answers
21 views

Nothing happens when trying to add value into taxonomy

When trying to add a value into any taxonomy (custom or default), nothing happens when the user clicks 'Add' (see http://i.imgur.com/Um1JsoD.png). My suspicion was that there may have been a js ...
1
vote
1answer
58 views

Using shipped version of jquery

Thare are no errors in the JS console. My goal is to use the shipped version of jQuery that Wordpress uses to work with bxslider. According the link shown here, the current version of jquery shipped ...
1
vote
0answers
33 views

esc_js() breaks unicode sequences by removing the slash '\' character

I've noticed that esc_js() is breaking unicode encoded characters by removing the '\' (slash) character. For example: esc_js('\u041f') returns: 'u041f' I can potentially use REGEX to identify ...
1
vote
1answer
55 views

Adding javascript actions to words in post content

I would like to have my blog run some JavaScript code when certain particular words are clicked on. One approach would be to include "onClick" handlers in HTML elements within the posts and disable ...
4
votes
3answers
243 views

Combine enqueue js without affecting dependencies

I want to combine little javascript files while keeping other script's dependencies for them. Is there any way? Details: New version of BuddyPress enqueue 6-7 little javascripts: // Legacy ...
0
votes
1answer
109 views

How to get DEFER or ASYNC attribute to appear when I add a stylesheet with wp_enqueue_style from a plugin? [duplicate]

Almost all of my CSS and JS resources can be postponed with an ASYNC or DEFER tag added to the resource. This may improve performance of my page load times considerably. However, I don't know how to ...
0
votes
1answer
29 views

How to deregister scripts all at once

How can I deregister all wordpress scripts all at once except for the admin? I have looked at the discussion How can I de-register ALL styles all at once? And same with Javascript?, but i do not want ...