// Once generated by CoffeeScript 1.9.3, but now lives as pure JS /* eslint-disable */ /* Find all the children of an element that match the selector, but only the first instance found down any path. For example, we'll find all the ".xblock" elements below us, but not the ones that are themselves contained somewhere inside ".xblock" elements. */ (function() { jQuery.fn.immediateDescendents = function(selector) { return this.children().map(function() { var elem; elem = jQuery(this); if (elem.is(selector)) { return this; } else { return elem.immediateDescendents(selector).get(); } }); }; }).call(this);