Suggestion: $(element).addTo(set)

Suggestion: $(element).addTo(set)

I'd like to suggest an addTo() method, since jQuery often has two methods to do the same task but switching the context between source and target.

For example, these could be equivalent:
  1. // Add to set using $.fn.add
  2. (function ($) {
  3.     var $set = $('#a, #b, #c');
  4.     $set.add($('#d'));
  5. })(jQuery);

  6. // Add to set using $.fn.addTo
  7. (function ($) {
  8.     var $set = $('#a, #b, #c');
  9.     $('#d').addTo($set);
  10. })(jQuery);

Example implementation:
  1. $.fn.addTo = function (collection) {
  2.     $(collection).add(this);
  3.     return this;
  4. };