diff --git a/entries/accordion.xml b/entries/accordion.xml index 20e706b..e3b8f38 100644 --- a/entries/accordion.xml +++ b/entries/accordion.xml @@ -107,10 +107,27 @@ The event that accordion headers will react to in order to activate the associated panel. Multiple events can be specified, separated by a space. - - - Selector for the header element, applied via .find() on the main accordion element. Content panels must be the sibling immediately after their associated headers. - + + Data identifying the header element. Content panels must be the sibling immediately after their associated headers. + + Selector for the header element, applied via .find() on the main accordion element. + + + + The accordion element + + A function accepting the accordion element and returning the header element. + + + Initialize the accordion with the header option specified as a function: + +$( ".selector" ).accordion({ + header: function ( accordionElement ) { + return accordionElement.find( "h3" ); + } +}); + +
Selector for the header element, applied via .find() on the main accordion element. Content panels must be the sibling immediately after their associated headers.
.find()
header
+$( ".selector" ).accordion({ + header: function ( accordionElement ) { + return accordionElement.find( "h3" ); + } +}); +