diff --git a/warnings.md b/warnings.md index ffbd963..9bf5383 100644 --- a/warnings.md +++ b/warnings.md @@ -56,7 +56,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs **Cause**: Prior to jQuery 4.0, when calling `.attr( name, value )` with any non-`false` non-`null` `value`, jQuery would actually set it to `name`. Similarly, regardless of the actual value, `.attr( name )` used to return `name` lowercased. jQuery 4.0 removes this special behavior. -**Solution**: Always set boolean attributes to their names, whether when using jQuery (`.attr( name, name )`), native APIs (`.setAttribute( name, name )`) or directly in HTML (``). +**Solution**: Always set boolean attributes to their names, whether when using jQuery (`.attr( name, name )`), native APIs (`.setAttribute( name, name )`) or directly in HTML (``). Avoid using the `.attr( name )` getter on boolean attributes, `.prop( name )` is preferred. ### \[attr-false\] JQMIGRATE: Setting the non-ARIA non-boolean attribute 'NAME' to false