Sha256: 9f637258e2d3274619536c03d69afab818875d73875c768aa012b6d77ac92374

Contents?: true

Size: 1.02 KB

Versions: 7

Compression:

Stored size: 1.02 KB

Contents

(function($) {
  // $.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

7 entries across 7 versions & 1 rubygems

Version Path
coolerator.vision-0.2.10 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.9 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.8 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.7 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.6 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.2.5 public/javascripts/vendor/coolerator/coolerator.base.js
coolerator.vision-0.1.0 public/javascripts/vendor/coolerator/coolerator.base.js