Sha256: 693aa3ef83764c4a51569706916a5ad79ea62129b3e227d5a4a403f7d2d5c8b6

Contents?: true

Size: 1.04 KB

Versions: 5

Compression:

Stored size: 1.04 KB

Contents

(function($) {
  // VERSION 0.1.0
  // $.noConflict();

  Coolerator = {
    DOM : {
      ELEMENT_NODE                : 1,
      ATTRIBUTE_NODE              : 2,
      TEXT_NODE                   : 3,
      CDATA_SECTION_NODE          : 4,
      ENTITY_REFERENCE_NODE       : 5,
      ENTITY_NODE                 : 6,
      PROCESSING_INSTRUCTION_NODE : 7,
      COMMENT_NODE                : 8,
      DOCUMENT_NODE               : 9,
      DOCUMENT_TYPE_NODE          : 10,
      DOCUMENT_FRAGMENT_NODE      : 11,
      NOTATION_NODE               : 12
    },

    REGEX : {
      FUNCTION_BODY : /^[^\{]*{((.*\n*)*)}/m
    }
  };

  $.fn.extend({
    match_for : function match_for(selector) {
      var match = undefined;

      $.each(this, function(i, content) {
        if(Coolerator.DOM.ELEMENT_NODE === content.nodeType) {
          match = (content = $(content)) && content.is(selector) ? content : content.find(selector);

          if(match.length) {
            return false;
          }
        }
      });

      return match;
    }
  });
})(jQuery);

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
coolerator.vision-0.2.4 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.3 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.2 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.1 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.0 public/javascripts/vendor/coolerator/coolerator.base.js