code: function (el, type) {
  		while (el && el.nodeName.toLowerCase() !== type.toLowerCase()) {
  			el = el.parentNode;
  		}
  		return el;
  	}
docs: Returns the closest element of a particular type.
  @hide
  @param {Object} el
  @param {Object} type