Use .detach() to keep jQuery events and data associated with elements
.remove() helpfully kills them all.
This commit is contained in:
committed by
Santhosh Thottingal
parent
148d43bf44
commit
c78371ff68
@@ -77,7 +77,8 @@
|
|||||||
|
|
||||||
if ( $element && $parent ) {
|
if ( $element && $parent ) {
|
||||||
// Avoid reflows while adding new elements to the list
|
// Avoid reflows while adding new elements to the list
|
||||||
$element.remove();
|
// Use .detach() to keep jQuery events and data associated with elements
|
||||||
|
$element.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.cache ) {
|
if ( this.cache ) {
|
||||||
@@ -121,8 +122,6 @@
|
|||||||
} else {
|
} else {
|
||||||
$parent.append( $element );
|
$parent.append( $element );
|
||||||
}
|
}
|
||||||
// Restore the events jQuery has helpfully removed
|
|
||||||
this.options.$target.listen();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.options.success ) {
|
if ( this.options.success ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user