I want to make $uibModal modal transparent when drugging and opaque when stop dragging.
For now, I tried jQuery fadeTo() and fadeIn() methods on the draggable stop event and the mouseup()
method. The modal becomes transparent but doesn't become opaque.
How can I do this animation? The plunker
.directive('uibModalWindow', [function() {
return {
link: function(scope, element, attr) {
console.log('element', element);
var dialog = element.find('.modal-dialog');
dialog.draggable({
handle: '.modal-header',
drag: function() {
$(this).fadeTo(1000, 0.8);
},
stop: function() {
$(this).fadeTo(1000, 1);
//$(this).fadeIn();
}
});
$('.modal-header').mouseup(function() {
dialog.fadeTo(1000, 1);
//dialog.fadeIn();
});
}
};
}]);