code: function partial(selector) {
    var templates = $('template')
      , context
      , arr = [];
    templates.each(function(el) {
      context = el && el.content ? el.content : el;
      arr = arr.concat(slice.call($(selector, context).dom));
    })
    return $(arr);
  }
docs: Find all template element(s) by selector.