[wp-trac] [WordPress Trac] #26378: Replace $.attr() with $.prop() in options-general.php to silence jQuery Migrate warning
WordPress Trac
noreply at wordpress.org
Tue Dec 3 18:17:59 UTC 2013
#26378: Replace $.attr() with $.prop() in options-general.php to silence jQuery
Migrate warning
--------------------------+-----------------------------
Reporter: Frank Klein | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
When clicking in the form fields to set a custom time or date format in
options-general.php, the radio input in front of the text field gets
automatically selected with jQuery.
This results in a jQuery Migrate warning:
{{{ JQMIGRATE: jQuery.fn.attr('checked') may use property instead of
attribute }}}
The attached patch replaces the use of `$.attr()` with `$.prop()` which
seems to be the preferred way according to the
[http://api.jquery.com/prop/#prop2 jQuery documentation]. This silences
the warning.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26378>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list