WordPress.org

Make WordPress Core

Changes between Version 4 and Version 5 of Ticket #22693, comment 17


Ignore:
Timestamp:
12/04/12 16:58:17 (17 months ago)
Author:
cdog
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22693, comment 17

    v4 v5  
    11The 'selected' attribute, when present, specifies that an option should be pre-selected when the page loads. 
    22 
    3 What we do is to simulate the 'selected' property using this attribute (which is not it's purpose). 
     3What we do is to simulate the 'selected' property using this attribute (which is not its purpose). 
    44 
    55A better approach would be to handle dropdowns using [http://api.jquery.com/select/ .select()] to trigger the event on the required element and [http://api.jquery.com/selected-selector/ :selected] selector to match the selected element as suggested in attachment:22693.5.diff. This way it's also possible to let the default value set to 'medium'.