Title: Loading jQuery.Dialog via enqueue_script in plugin admin area
Last modified: August 19, 2016

---

# Loading jQuery.Dialog via enqueue_script in plugin admin area

 *  [palamedes](https://wordpress.org/support/users/palamedes/)
 * (@palamedes)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/loading-jquerydialog-via-enqueue_script-in-plugin-admin-area/)
 * Howdy all..
 * I am writing a plugin and I have the settings area defined and working fairly
   nicely.. but I wanted to add some spiffy jQuery stuff using the jquery.ui and
   jquery.dialog functionality..
 * But I can’t seem to get jquery.dialog to load..
 * At the bottom of my widget definition (which is a class) I have:
 * `add_action("init", array('myWidget','init'),1000,0);`
 * This calls myWidget::init() which in turn looks like this;
 *     ```
       function init() {
           wp_enqueue_script('jquery-dialog');
           add_action('admin_menu', array('myWidget', 'registerAdminPage'));
       // More stuff..
       }
       ```
   
 * The very first thing I’m doing is trying to enqueue jquery-dialog to be loaded..
 * I have tried putting that call in different places and it never seems to work.
 * jQuery.dialog is simply not defined..
 * How do I go about loading jquery-dialog?

Viewing 1 replies (of 1 total)

 *  [spencersokol](https://wordpress.org/support/users/spencersokol/)
 * (@spencersokol)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/loading-jquerydialog-via-enqueue_script-in-plugin-admin-area/#post-1193076)
 * Looking at the codex page for wp_enqueue_script shows that it’s called ‘jquery-
   ui-dialog’. The dialog also depends on the ui core, so you’ll need to include
   that too.
 *     ```
       wp_enqueue_script('jquery');
       wp_enqueue_script('jquery-ui-core');
       wp_enqueue_script('jquery-ui-dialog');
       ```
   
 * I think there may actually be more to it… there’s probably some default styles
   to load with wp_enqueue_style.

Viewing 1 replies (of 1 total)

The topic ‘Loading jQuery.Dialog via enqueue_script in plugin admin area’ is closed
to new replies.

## Tags

 * [dialog](https://wordpress.org/support/topic-tag/dialog/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [jquery-dialog](https://wordpress.org/support/topic-tag/jquery-dialog/)
 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * 1 reply
 * 2 participants
 * Last reply from: [spencersokol](https://wordpress.org/support/users/spencersokol/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/loading-jquerydialog-via-enqueue_script-in-plugin-admin-area/#post-1193076)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
