code: function jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {
    var originalJqFn = jQuery.fn[name];
    originalJqFn = originalJqFn.$original || originalJqFn;
    removePatch.$original = originalJqFn;
    jQuery.fn[name] = removePatch;
  
    function removePatch(param) {
      // jshint -W040
      var list = filterElems && param ? [this.filter(param)] : [this],
          fireEvent = dispatchThis,
          set, setIndex, setLength,
          element, childIndex, childLength, children;
  
      if (!getterIfNoArguments || param != null) {
        while(list.length) {
          set = list.shift();
          for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
            element = jqLite(set[setIndex]);
            if (fireEvent) {
              element.triggerHandler('$destroy');
            } else {
              fireEvent = !fireEvent;
            }
            for(childIndex = 0, childLength = (children = element.children()).length;
                childIndex < childLength;
                childIndex++) {
              list.push(jQuery(children[childIndex]));
            }
          }
        }
      }
      return originalJqFn.apply(this, arguments);
    }
  }
docs: /////////////////////////////////////////// jQuery mutation patch  In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a $destroy event on all DOM nodes being removed.  ///////////////////////////////////////////