Example #1
0
DOM.style = function(property, value){
  DOM.each(function(e){
    var styles = e.getAttribute('style') || '';
    value += is.Numeric(value) ? 'px' : '';
    e.setAttribute('style', styles + ' ' + property + ': ' + value + ';');
  });
};
Example #2
0
DOM.on = function(action, func){
  DOM.each(function(e){
    e.addEventListener(action, func);
  });
  return this;
};
Example #3
0
DOM.removeAttr = function(attr) {
  DOM.each(function(e){
    e.removeAttribute(attr);
  });
  return this;
};
Example #4
0
DOM.attr = function(attr, value) {
  DOM.each(function(e){
    e.setAttribute(attr, ""+value);
  });
  return this;
};
Example #5
0
DOM.html = function(value) {
  DOM.each(function(e){
    e.innerHTML = value;
  });
  return this;
};
Example #6
0
DOM.show = function(){
  DOM.each(function(e){
    e.style.display = '';
  });
  return this;
};
Example #7
0
DOM.hide = function(){
  DOM.each(function(e){
    e.style.display = 'none';
  });
  return this;
};