Incorporate feedback from PR review

This commit is contained in:
Sebastian Serth
2019-03-12 13:01:25 +01:00
parent 900bc896c9
commit d63469099b
3 changed files with 91 additions and 90 deletions

View File

@ -24,7 +24,8 @@ $.fn.scrollTo = function(selector) {
}, ANIMATION_DURATION);
};
$.fn.replaceWithPush = function(a) {
// Same as $.replaceWith, just returns the new element instead of the deleted one
$.fn.replaceWithAndReturnNewElement = function(a) {
const $a = $(a);
this.replaceWith($a);
return $a;