---
{
"title": "Correctif « details/summary » (contenu affichable/masquable)",
"language": "fr",
"category": "Correctifs",
"categoryfile": "polyfills",
"description": "Émule les éléments « details » et « summary » pour les navigateurs qui ne le supportent pas. Les éléments « details » et « summary » éléments permettent au contenu d'être affiché et masqué.",
"altLangPrefix": "details",
"dateModified": "2014-08-04"
}
---
Les éléments But
details et summary éléments permettent au contenu d'être affiché et masqué. Étant donné que certains navigateurs ne prennent pas en charge cette fonctionnalité à l'origine, ce correctif émule la même fonctionnalité à l'aide de HTML générique et WAI-ARIA.
Needs translation
To use the polyfill, standard details and summary elements must be used. In cases where a browser doesn't support these elements, the polyfill is automatically loaded.
Configuration options available for the details and summary elements (HTML5 specification)
| Event | Trigger | What it does |
|---|---|---|
| wb-init.wb-details | Triggered manually (e.g., $elm.trigger( "wb-init.wb-details" );). |
Used to manually initialize the details/summary polyfill on a summary element. Note: The details/summary polyfill will be initialized automatically unless the summary element is added after the page has already loaded. |
wb-init.wb-details |
Triggered manually (e.g., $( "summary" ).trigger( "wb-init.wb-details" );). |
Used to manually initialize the details/summary polyfill on a summary element. Note: The details/summary polyfill will be initialized automatically unless the summary is added after the page has already loaded. |
wb-ready.wb-details (v4.0.5+) |
Triggered automatically after the details/summary polyfill initializes. Note: This event will only be triggered if the polyfill is loaded. The polyfill will not load for browsers with native details/summary support. | Used to identify where the details/summary polyfill initialized (target of the event)
|
wb-ready.wb (v4.0.5+) |
Triggered automatically when WET has finished loading and executing. | Used to identify when all WET plugins and polyfills have finished loading and executing.
|