A client side scripting language useful for making interactive web sites

learn more… | top users | synonyms

5
votes
0answers
227 views

Reset Undo on the tinymce editor

I have one editor where I switch between content in one editor, and what I want to do when I set the new content, I would like to reset the undo possibility. I have read on this site http://www....
3
votes
0answers
498 views

When does Wordpress wrap inline scripts in CDATA?

I'm debugging a problem with a third party script of ours that wordpress users use by copy / pasting a snippet of script and html into their post's bodies like (non-real world example of course): <...
3
votes
0answers
105 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 ...
3
votes
0answers
729 views

Customizing the 3.5 “Add Media” popup (Backbone.js)

Here's yet another question in regard to the new(ish) 3.5 "Add Media" popup and how to customize it! What I'm trying to do I'm attempting to do four main things: 1) Create a custom tab titled "...
3
votes
0answers
1k views

How to bind data-src attribute for the image in the post using jquery?

I'm trying to use foresight.js for responsive image in the wordpress blog. For that I have to add the data-src attribute in the place of src in the <img> tag. Or I have to get the url from the ...
2
votes
0answers
15 views

Script won't execute in the media manager

I'm trying to execute a jquery script on the click of a button in a custom tab of the media manager, but it does not seem to work. I have been told this might be due to the button not being loaded ...
2
votes
0answers
19 views

Detecting Wordpress Customizer Panel

Recently started developing a Wordpress theme relying heavily on the customizer API. One thing I'm stuck with is detecting when a specific panel has been clicked or opened. Regular old "on click" ...
2
votes
0answers
780 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
vote
0answers
20 views

Wordpress Media frame pre load images from ids

Im using custom metabox button to create wp media frame with this code, var frame, selection, idsField = $('#_fills_ids'); frame = wp.media({ title: 'Select or Upload Media Of ...
1
vote
0answers
19 views

wp attempt focus, disabling without touching core

So i've added an extra field to the login form. I have used js to place it at the top. However, whatever I do I don't seem to be able to change the tabindex(or start focus for that matter. Is there a ...
1
vote
0answers
45 views

Tinymce.js editor in Chrome?

For 3+ years I had a custom styles menu in my Wordpress editor that I added in functions.php which worked great. Today, I went in to edit a new post, and not only doesn't my menu work, but I cannot ...
1
vote
0answers
151 views

PHP array to JS array to use in google map

Hi I want to use some data stored in a php array to use it in google map api, to populate multiple locations in a the map. I use the loop to create my php array. <?php while ( $the_query-&...
1
vote
0answers
42 views

Dynamic Custom Fields

I am working on a custom invoicing system for a client. I am looking for the best way to implement adding products dynamically to the invoice in the wordpress admin. There are hundreds of products ...
1
vote
0answers
67 views

PhantomJS with wordpress

I know it sounds basic but I'd really appreciate some help/guidence on how to use phantomjs on my wordpress project. I'm using Windows 8.1 and local host with xampp for now. I've downloaded phantomjs ...
1
vote
0answers
12 views

Weird issue with slider on javascript

I have a page that i am using revolution slider on the page and everything works fine. I have a global javascript that runs on each page that looks at the url variables on the page, city and tel and ...
1
vote
0answers
85 views

Audio Player not loading when the content is loaded through Ajax, MediaElement.js no applied

When I load the content using ajax it doesn't apply MediaElements.js to my audio player, so the audio isn't display. I think this is because the MediaElement.js is loaded with wp-footer(), and this ...
1
vote
0answers
43 views

Add custom JavaScript that is a combination of CDN/uploaded files and easily-edited code?

I would like to add some custom JavaScript to my site: a combination of external CDN-hosted files, static library files hosted locally, and local JavaScript that I'd like to be able to edit in the ...
1
vote
0answers
92 views

Call javascript function when category was added via ajax

I've created a plugin to handle featured images for categories (well, for custom taxonomy actually, but it doesn't matter). Everything is working fine, except the featured image is not cleared after ...
1
vote
0answers
239 views

How to refresh Theme Customizer after change color inside wpColorPicker?

I develop my custom widget with setting where I can set up custom color for the widget. I use this code to initialize wpColorPicker instead of default text input in form() method of Widget class: ...
1
vote
0answers
36 views

Redux Framework: Page freezes on typing in Editor

I am using Redux Framework. I am facing an Issue with the editor in Theme Options of Redux Framework Currently I have 103 editors in the options. My Issue is that whenever I start typing ...
1
vote
0answers
19 views

wordpress 4.4 upgrade visual editor bullets select for not selected elements

Please check attachment for reference image and help me to fix it please.
1
vote
0answers
77 views

How do I pass the id of my widget to javascript in the form function?

I would like to add a Quilljs editor to the admin area of my widget, but I am having trouble passing $this->id to javascript. I am using the foo_example widget code, and I've appended the ...
1
vote
0answers
63 views

Using React.js in WordPress

I want to add a "Widget" that is built with React.js to my WordPress site. It will not be dependent on any outside data. Besides adding npm modules and adding build processes to my Gruntfile (to ...
1
vote
0answers
130 views

Making a custom widget that includes a tinymce and works in Site Origin Page Builder

For a client I'm using Site Origins Page Builder plugin. It enables the client to make rich layouts for each page by dragging and dropping widgets. Site Origin widgets that require a WYSIWYG-editor ...
1
vote
0answers
71 views

How to create a repeatable / reusable divs in the metabox?

I have a meta box: <?php function custom_meta_box_markup() { global $post; $meta_box_text = get_post_meta( $post->ID, 'meta-box-text', true ); $meta_box_text_day = get_post_meta( $...
1
vote
0answers
2k views

Google PageSpeed Enable Compression isn't working?

I am trying to improve pagespeed of my website. When I test my site it tells "Compressing https://z-1-static.xx.fbcdn.net/rsrc.php/v2/yF/r/SQ7jeOqw5xW.js could save 188.3KiB (70% reduction)." I have ...
1
vote
0answers
40 views

how to localized scripts of new page requested by ajax?

I'm using ajax to load pages in WP ( all links of my theme works with ajax) and when i go from a page to another, I remove old script tag ( current page ) and add scripts of requested page dynamically(...
1
vote
0answers
131 views

How to overwrite JS variable with wp_localize _script?

The function wp_localize_script( $handle, $name, $data ); does not work when trying to overwrite the same variable, that is when calling the function second time with the same $handle and $name but ...
1
vote
0answers
512 views

How to add a Custom Mailchimp AJAX Newsletter Subscribe Form

I want to add a custom Mailchimp AJAX Newsletter Subscribe Form to my WP Blog. I found this tutorial and have followed it: http://neal.codes/blog/custom-mailchimp-ajax-newsletter-subscribe. I've got ...
1
vote
0answers
150 views

Dropzonejs with WPCF7

I have a form with the plugin WPCF7 and i have made it possible to upload multiple files(with drag and drop). Now the customer wants to upgrade the form too be able to upload several files at a time ...
1
vote
0answers
75 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
vote
0answers
87 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: https:/...
1
vote
0answers
111 views

Theme Customiser not live previewing changes on pseudo elements

I've been working with the Theme Customiser API lately and found that pseudo elements are not live updating using the previewer. In my project I have an image containing a transparent overlay using ...
1
vote
0answers
201 views

Refreshing collections in the admin media manager

I know this question is very similar to this previously asked question; however, I was wondering if there was a more up-to-date/official way to refresh content programmatically in the WordPress admin ...
1
vote
0answers
105 views

Media Upload , file name changed automatically

I face a problem that when i upload a video that named in non-english language , for example : Arabic , it placed in uploads folder with strange name Ùيديووو so it can't be access through ...
1
vote
0answers
58 views

Limit filetype and wp media

This is my input markup: <div class="button-primary" id="fileToUpload">Upload</div> This is js: jQuery( '#fileToUpload' ).click( function() { var custom_uploader = wp.media ({ ...
1
vote
0answers
86 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"; ...
1
vote
0answers
103 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
0answers
82 views

Resetting admin post form on JS validation fail

I've got a custom plugin with a metabox and dynamic form (the user can ask for more elements of the form), with jQuery Validation plugin working great. The problem is when the validation comes back ...
1
vote
0answers
271 views

Wordpress 3.8.3. custom theme - sliders won't load js/css files

I'm building custom WP theme and I have issues with sliders. None of those I've tried to install worked. When I looked into the developers console, and searched for their js/css files, they where not ...
1
vote
0answers
120 views

Wordpress Scripts Being Loaded in Footer

I've bought a theme for a Wordpress site. I noticed that the theme author has added the javascript to the footer for load time, but as I use Gravity forms, I understand that some of scripts need to ...
1
vote
0answers
1k views

Multiple Frontend Filters Using Advanced Custom Fields

I've got a series of custom post types set up, and a large amount of custom fields are linked to these post types via the Advanced Custom Fields plugin. I want to set up a series of checkboxes on the ...
1
vote
0answers
283 views

Fancybox type popup window that's not an iframe

I'm a bit stuck and need some help to get me going in the right direction. I'm trying to do something similar to the lightbox style popup on this website: http://cargocollective.com/montessori I ...
1
vote
0answers
92 views

videopress videos are not displayed when loading the content with ajax in a lightbox

I'm using videopress and I'm adding the videos into posts with the videopress shortcode, and when I visit the post I can see the videos and play them, but the problem is when loading the post with ...
1
vote
0answers
578 views

Single page site with history.js

I'm developing a single page site that shows each page on the front page, like so: *-----------------* | Home | ...
1
vote
0answers
141 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 <script&...
1
vote
0answers
209 views

Accessing theme customizer farbtastic object instances

I have multiple individual color pickers set up in the theme customizer, which results in several instances of the farbtastic color picker. I am trying to find the jQuery/JavaScript instance variable ...
1
vote
0answers
146 views

How does Wordpress handle HTML Tables interaction with jQuery

I have javascript that gets the width of a table and reduces the css fontsize of text within the table until the table width is less then the width of its parent div. The code bellow shows the ...
1
vote
0answers
792 views

GeoMashup plugin: how to customize cluster markers / icons?

Is there a way to customize the standard cluster icon marker which GeoMashup uses to display nearby posts grouped in a certain area? By default it's a red dot in V2, or a blue dot in V3. I nee to ...
0
votes
0answers
11 views

Implement a layout for feautured images on a single category

This is kinda hard to explain but here we go, im trying to use the flex laytout from Freewall for my posts featured images on my category of "gallery", i want only the featured image to display the ...