code: function(element) {
  
              var parent = element.parentNode;
  
              // If input already have parent just pass through
              if (parent.tagName.toLowerCase() === 'i' && parent.classList.contains('waves-effect')) {
                  return;
              }
  
              // Put element class and style to the specified parent
              var wrapper       = document.createElement('i');
              wrapper.className = element.className + ' waves-input-wrapper';
              element.className = 'waves-button-input';
  
              // Put element as child
              parent.replaceChild(wrapper, element);
              wrapper.appendChild(element);
  
              // Apply element color and background color to wrapper
              var elementStyle    = window.getComputedStyle(element, null);
              var color           = elementStyle.color;
              var backgroundColor = elementStyle.backgroundColor;
  
              wrapper.setAttribute('style', 'color:' + color + ';background:' + backgroundColor);
              element.setAttribute('style', 'background-color:rgba(0,0,0,0);');
  
          }
docs: Wrap <input> tag so it can perform the effect