amAppendTo
Option name | Type | Description |
---|---|---|
target | JQuery, HTMLElement, String | |
options | object | animorph options like namespace |
return | Promise | Animation Promise |
Append the current element to the target
This will start a move animation if the current element is already in the dom.
$.fn.amAppendTo = function (target, options) {
return appendTo(this.toArray(), $(target)[0], options);
};
amPrependTo
Option name | Type | Description |
---|---|---|
target | JQuery, HTMLElement, String | |
options | object | animorph options like namespace |
return | Promise | Animation Promise |
Prepend the current element to the target
This will start a move animation if the current element is already in the dom.
$.fn.amPrependTo = function (target, options) {
return prependTo(this.toArray(), $(target)[0], options);
};
amRemove
Option name | Type | Description |
---|---|---|
options | object | animorph options like namespace |
return | Promise | Animation Promise |
Run a leave animation and remove the current element from the dom after it finished
$.fn.amRemove = function (options) {
return remove(this.toArray(), options);
};
amLeave
Option name | Type | Description |
---|---|---|
options | object | animorph options like namespace |
return | Promise | Animation Promise |
Run a leave animation and remove the current element from the dom after it finished
$.fn.amLeave = function (options) {
return leave(this.toArray(), options);
};
amInsertAfter
Option name | Type | Description |
---|---|---|
target | JQuery, HTMLElement, String | |
options | object | animorph options like namespace |
return | Promise | Animation Promise |
Inserts the current element after the target
This will start a move animation if the current element is already in the dom.
$.fn.amInsertAfter = function (target, options) {
return insertAfter(this.toArray(), $(target)[0], options);
};
amReplaceClasses
Option name | Type | Description |
---|---|---|
classNamesBefore | String, Array.<String> | class names to remove |
classNamesAfter | String, Array.<String> | class names to add |
Transition | String | name |
options | object | animorph options like namespace |
return | Promise | Animation Promise |
Adds and removes css-classes from the given element.
$.fn.amReplaceClasses = function (classNamesBefore, classNamesAfter, transitionName, options) {
return replaceClasses(this.toArray(), classNamesBefore, classNamesAfter, transitionName, options);
};
export * from './vanilla.js';