4
votes
1answer
119 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 ...
0
votes
2answers
55 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 ...
1
vote
1answer
197 views

Create Image Uploader for Widget

I found this post// Use Media upload in custom widget on wordpress 3.5 I'm not experienced in any of this so I pretty much just copied the code he provided into my own functions.php file. I uploaded ...
0
votes
0answers
50 views

Adding SSL verification seal javascript from Thawte breaks website

We are trying to add Thawte SSL seal javascript to our website, but it keeps everything else from loading if added to a normal text widget. For example, if we add it to where the Thawte SSL image link ...
0
votes
2answers
324 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
250 views

Creating a custom wordpress widget and stopping js from running twice(once in active widget once in widget selector)?

Ok so here's the question how do i stop js from running twice on the widget.php page? I am creating a ajax loaded custom image selector from a domain on the same server as the current site. I want ...
0
votes
2answers
67 views

random reason on refresh

I am editing the sidebar widgets and have added one for users who are not logged in or registered. the widget requests that users register or login and I am wanting to add a random reason (quote) as ...
0
votes
0answers
54 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 ...
2
votes
2answers
196 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
2answers
198 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
2answers
2k views

WP_enqueue_script() loads them always in wp_footer()?

This is my example code placed in functions.php: function my_init_method() { wp_enqueue_script('jquery'); wp_enqueue_script('jquery-ui-core', false, array('jquery'), false, false); ...
1
vote
1answer
542 views

Run JS after widget settings are saved?

I've written a small widget that uses JS for setting up some tabs in the settings panel. Is there a way to re-trigger the tab JS when the widget is done saving? Looking at the WP JS source it doesn't ...
1
vote
1answer
672 views

AJAX Contact Form Issue

I created a contact form for my sidebar that is working perfectly in Chrome but not in IE or FF. I've been staring at it for hours and can't find out what I did wrong. I'm not getting any errors ...
0
votes
1answer
1k views

Add text to Text Widget using Javascript

Wordpress has a Text Widget (at least the theme I'm using does, and I think they all do?) In this widget I can add text or HTML. If I add HTML I can include JavaScript. This works fine (I'm hosting ...
8
votes
3answers
7k views

Loading scripts only if a particular shortcode or widget is present

I needed a way to filter a page/posts content before it was loaded so I could add scripts to the header if a specific shortcode was present. After much searching I came across this on ...
1
vote
2answers
270 views

Widget code is not working on WordPress.com Hosted Blogs

I have developed a JavaScript widget which works fine when I embed it in any of my html pages. The code is something like this <script type="text/javascript" charset="utf-8"> var asset_host = ...
1
vote
1answer
485 views

Widget Javascript code (ajax)

I have a widget like this: class test_widget extends WP_Widget{ function test_widget(){ $widget_ops = array('description' => 'test widget'); $this->WP_Widget(false, 'Test', ...