Commit 9dd48a23 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

closeable.js add slideUp effect on close

makes it more apparent that something has happened when closing a field
element
parent 597a523b
......@@ -6,7 +6,15 @@ Closeable.prototype = {
createCloseButton: function() {
var x = document.createElement('i');
x.className = "icon-cancel";
x.onclick = function() {this.parentNode.parentNode.removeChild(this.parentNode);};
x.onclick = function() {
var elem = this.parentNode;
$(elem).slideUp({
'duration': 150,
'complete': function() {
elem.parentNode.removeChild(elem);
}
});
}
return x;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment