A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

0
votes
0answers
5 views

Load php function with AJAX on modal window

On a movie information wordpress theme i am developing, i have an href with text "watch trailer" on each cover of all movies. This brings a modal window, and that is working already, but i want to ...
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
20 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 [closed]

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 ...
3
votes
5answers
7k views

Adding onload to body

I'm currently trying to develop a plugin that will embed a Google Earth Tour into a WP post / page via a shortcode. The issue I am running into is that for the tour to load, I have to add an ...
1
vote
1answer
211 views

JavaScript and images files are not recognized

It might be the simplest question but I can't find why my JavaScript files and images are not recognized by WordPress. I put all my JS files and images in my theme's folder, so I created a folder ...
0
votes
1answer
592 views

Load plugin JS in footer

I am trying to load JS files in my theme's to footer.All my custom JS files are being added to WordPress using wp_enqueue_script, but i am unable to find any way which will help me to load them in ...
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 [closed]

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
2answers
331 views

Filter custom post types by custom field using AJAX

I have a few custom post types (books, films etc) created with WP-Types. I then have a custom field called Genre, created with ACF. If a user selects "Books" from the dropdown on the frontpage, he ...
0
votes
1answer
286 views

Linking Javascript in functions.php file

Below is my raw javascript embeds from my html template. But I cannnot figure out exactly how to add it to my functions.php file. It seems pretty difficult. Can you please assist with the correct ...
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
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
21 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
332 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
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
1answer
819 views

AJAX filter posts on click based on category

This is my first foray into AJAX, I've been splicing bits of code from various tutorials which probably hasn't helped. I have a list of categories on my homepage (index.php) and a list of the most ...
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
54 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
784 views

Replace link with form to pass variables to javascript / ajax

I'm sending a single variable to javascript/ajax via a link, but want to send via a form so I can pass user input as well. (It's for a plugin that interfaces with an Echonest Remix python script to ...
0
votes
1answer
17 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
2answers
3k views

Using TinyMce with textareas in meta boxes on custom post types

I am trying to use the http://www.tinymce.com/ plugin to add a tinymce to my textareas in my meta boxes I have created. I've googled other ways and either I cant get it to work or didnt grasp the ...
0
votes
3answers
465 views

How do I add some javascript validation to the admin interface form's onsubmit?

I have a plugin that adds meta boxes to the admin interface and I need to do some validation when the user presses the "update" button before the form is submitted. Is there a WordPress action or ...
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 ...
3
votes
1answer
530 views

Menu Link Redirect Based on Username or User ID

I am building a client portal where my clients can log in and see all their pending projects, completed projects and create new projects. Though I'm stuck at the start. The dropdown menu is called ...
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
330 views

How to add a onclick attribute to a list of checkboxes?

I have this array for checkbox: array( 'name' => __('Latest Product',''), 'desc' => __('Select if you want to display latest product',''), 'id' => $prefix . ...
0
votes
1answer
323 views

Custom attributes to javascript tags

My site uses cloudflare but I really want to enable rocket loader, but if I put it on automatic mode, it messes up my whole site... So I googled and found This answer which has helped in terms of ...
2
votes
2answers
401 views

Elegantly using JavaScript on widget admin forms

I'm working on a project involving a lot of widgets, and I'm thinking it'd be really great to have a "More options" section built using jQuery UI Accordion that expands when clicked. So, I've ...
0
votes
3answers
367 views

Loading multiple post content in FancyBox

I have a custom post type being output as a list. I'm trying to output some of the inline content in each li via Fancybox. All works so far except it only shows the first li's content. I understand ...
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 ...
1
vote
1answer
736 views

Placing Ads after every 10th Post with Infinite Scroll

I have to load a couple of ads, some normal html and two are java script. I've tried the PHP method of this: <?php $postnum++; if($postnum%10 == 0) { ?> <div id="topset"> <ul ...
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 ...
0
votes
1answer
2k views

Ajax page load without reload

I am working on a script to load my page without refreshing. It is working as I want it except for one thing. The test site I have up is http://dev.dog-company.com . Only home About us and FAQ will ...
1
vote
2answers
207 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: ...
9
votes
2answers
549 views

Executing Javascript When a Widget is Added in the Backend

I have widgets that have javascript controls attached to them. If the widget is present when the widget admin page loads, the controls work correctly. When I add a new widget, they do not work ...
1
vote
3answers
290 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
338 views

Resolving Javascript errors likely related to Gantry framework

I'm trying to resolve some Javascript errors on a site I'm working on (built using the Gantry framework), as I have a sneaking suspicion they're keeping some plugins from working properly. For ...
0
votes
2answers
375 views

How to make featured image thumbnails on index page load smoother?

I'm using a theme called Hatch Pro, which is a gallery based theme and the index page displays the posts using the featured image. You can see it here. On slower browser environments, the images ...
0
votes
2answers
435 views

Unable to load “wpColorPicker” on theme customize page

Whether I'm using a Wordpress default theme or a custom one, I see the JS error: Uncaught TypeError: Object [object Object] has no method 'wpColorPicker' when I click "Customize" on the theme. I've ...
0
votes
1answer
585 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: ...
2
votes
1answer
491 views

Wordpress Ajax Login without page reload

I'm currently developing a Wordpress theme where I want the user to be able to upload images before he register or log in to the site. The initial problem was, you can´t upload images to wordpress ...
0
votes
1answer
2k views

Parse wordpress blog data using json api and ajax

I have seen lots of responses to how to extract data from wordpress blog posts using the json api plugin. Many uses $.getJSON, $.ajax, .responseData.feed.entries, success function() etc. What is the ...
1
vote
1answer
305 views

Defer all js except certain ones in functions.php file

I read How to add defer="defer" tag in plugin javascripts? and the code @toscho posted works good to defer certain js files or deferring ALL js files by commenting out the contact-form-7 ...
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? ...