Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 130709

Using a jquery dialog inside a widget

$
0
0

Replies: 0

Hi!

I am trying to add a jquery dialog inside a widget.

I use the jquery example listed above, the only difference is how I include the scripts.

I enqueue the required js and css scripts in my plugin functions file:


function my_custom_script() {
	wp_enqueue_script( 'my_script', plugins_url( '/js/my-file.js' , __FILE__ ), array('jquery', 'jquery-ui-core', 'jquery-ui-dialog') );
	wp_enqueue_style('my_css', plugins_url('/css/jquery-ui.css',__FILE__));
}
add_action( 'admin_enqueue_scripts', 'my_custom_script' );

I know all required scripts and my-file.js are loaded on widget page. But no effect when I click the button.

Is jquery blocked inside the Widgets Api perhaps?

Guido


Viewing all articles
Browse latest Browse all 130709

Trending Articles