7.9.8.1 Creating drop-down hotspots with Mif2Go controls and macros
The following settings use Mif2Go format property DropDownLink and two macros to handle open/close actions for dedicated drop-down paragraph format DropPara.
DropPara = DropDownLink CodeBefore CodeAfter
; At the start of any of the following paragraphs,
; close any open drop-down blocks:
DropPara = <$DropDownBlockClose>
; List any other paragraphs that should end a drop-down block:
DropPara = <$DropDownBlockOpen>
; At end of body, close any open drop-down blocks:
Bottom = <$DropDownBlockClose>
; After DropPara, insert javascript to open a new drop-down block,
; and set a flag to signify that the block is open. The javascript
; includes a counter to identify the drop-down section:
<div class="dropdown" id="drop<$$DropDownCount as %0.1d>"
onclick="noSection('drop<$$DropDownCount as %0.1d>')">
<$$Flag_DropDownBlockOpen = 1>
; Before DropPara or H1 through H5 or </body>,
; check a flag to see if a drop-down block is open;
; if so, close the drop-down block and clear the flag:
<$_if ($$Flag_DropDownBlockOpen)>
<$$Flag_DropDownBlockOpen = 0>
; Put any macro definition sections before this section.
> 7 Producing on-line Help > 7.9 Including expandable sections in Help topics > 7.9.8 Emulating Web Works Publisher drop-down hotspots > 7.9.8.1 Creating drop-down hotspots with Mif2Go controls and macros