app/assets/javascripts/foundation/foundation.placeholder.js
File foundation.placeholder.js
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* The MIT License
*
* Copyright (c) 2012 James Allardice
*
Avoid deeply nested control flow statements. Open
Open
if (placeholder !== elem.getAttribute(ATTR_CURRENT_VAL) || (elem.type === "password" && !elem.getAttribute(ATTR_INPUT_TYPE))) {
// Attempt to change the type of password inputs (fails in IE < 9)
if (elem.type === "password" && !elem.getAttribute(ATTR_INPUT_TYPE) && Utils.changeType(elem, "text")) {
elem.setAttribute(ATTR_INPUT_TYPE, "password");
Avoid deeply nested control flow statements. Open
Open
if (!elem.getAttribute(ATTR_EVENTS_BOUND)) {
newElement(elem);
}