The caution is alerting you that the upcoming line may contain a mistake or bug:
( inputField.val() === '' ) ? inputField.prev('.cd-label').removeClass('float') : inputField.prev('.cd-label').addClass('float');
This is an expression that utilizes the ternary operator which returns the value after the ?
if the expression before it is true, or the value after the :
if not. Essentially, it functions like a concise if
statement that results in an assignment.
To eliminate the caution, you should assign it to a variable in this manner:
var yourVariable = ( inputField.val() === '' ) ? inputField.prev('.cd-label').removeClass('float') : inputField.prev('.cd-label').addClass('float');
However, in your situation, you may not actually want to assign this to anything, so it would be better to use an if
statement instead.