Here’s a quick tip. If you built a custom widget for your themes/plugins and you need jQuery for the configuration form, you’ll need to call it when the ajax process is done, that is when a widget was just dropped to a sidebar/widget area, or the user just saved the configuration.
jQuery(document).ready(function($) {
$('.widgets-sortables').ajaxSuccess(function() {
// do your thing
});
});

