On my site, I load jQuery UI script using the following code:
wp_enqueue_script('nf-jquery-ui','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js')
In my plugin I use the following code:
wp_enqueue_script('wp_filebrowser-jqueryui','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js')
The result is that both these lines are added to my header - and loading a script twice is not very good.
Yes, I know I can remove it from either my plugin or my site. But the point is that anyone can download my plugin, and they might already be loading the jQuery UI script.
How can I avoid having a script being added twice?