Sha256: c876ae104500f3c9b2e900ebce9191c4719e9345c81fa49a65b1715eb5b8c5eb

Contents?: true

Size: 916 Bytes

Versions: 10

Compression:

Stored size: 916 Bytes

Contents

// Add indexOf and getElementsByClassName methods
// See: http://stackoverflow.com/questions/13261506/getelementsbyclassname-in-ie8
(function() {
  var indexOf = [].indexOf || function(prop) {
    for (var i = 0; i < this.length; i++) {
      if (this[i] === prop) return i;
    }
    return -1;
  };

  window.getElementsByClassName = function(className, context) {
    if (context.getElementsByClassName) return context.getElementsByClassName(className);
    var elems = document.querySelectorAll ? context.querySelectorAll("." + className) : (function() {
      var all = context.getElementsByTagName("*"),
        elements = [],
        i = 0;
      for (; i < all.length; i++) {
        if (all[i].className && (" " + all[i].className + " ").indexOf(" " + className + " ") > -1 && indexOf.call(elements,all[i]) === -1) elements.push(all[i]);
      }
      return elements;
    })();
    return elems;
  };
})();

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
amcharts.rb-3.11.2.17 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.11.2.16 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.11.2.14 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.11.1.14 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.4.8.0 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.4.7.5 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.4.7.4 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.4.7.3 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.4.7.2 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js
amcharts.rb-3.4.7.1 app/assets/javascripts/amcharts/ext/get_elements_by_class_name.js