How to make all dropdown texts open by default?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
mhd
Propeller Head
Posts: 23
Joined: Mon May 27, 2013 2:04 am
Location: Liège (Belgium)
Contact:

How to make all dropdown texts open by default?

Post by mhd »

Hello,
In the HTML5 outputs, all dropdown texts are automatically closed by default. The user needs to click the head to open the dd. Most of the time, this behavior is appropriate.
But I'd like to expose a software doc just like MSDN does. Everything is expanded when you load the page. For instance: https://msdn.microsoft.com/en-us/librar ... 98228.aspx.
Is there a way to make them all open by default?
By some javascript? Or is there a kind of css mc-default-state property on MadCap:dropDown elements, that would stay closed by default, but that we could change to open?
Thanks!
kwag_myers
Propellus Maximus
Posts: 810
Joined: Wed Jul 25, 2012 11:36 am
Location: Ann Arbor, MI

Re: How to make all dropdown texts open by default?

Post by kwag_myers »

The only way I know to do it is to remove style="display: none;" from the div syntax post build. Example:

Code: Select all

<div class="MCDropDownBody" id="MCDropDownBody_242886737_0" style="display: none;">

becomes

<div class="MCDropDownBody" id="MCDropDownBody_242886737_0">
You can do this with a third-party find and replace tool that supports wildcards. Not knowing what else you have in your project, I would avoid doing a simple replace style="display: none;" with nothing. You want to search for the whole div: <div class="MCDropDownBody" id="MCDropDownBody_*" style="display: none;">
"I'm tryin' to think, but nothin' happens!" - Curly Joe Howard
MattyQ
Sr. Propeller Head
Posts: 136
Joined: Tue Sep 30, 2014 7:10 am
Location: Roanoke, VA

Re: How to make all dropdown texts open by default?

Post by MattyQ »

Depending on your approach and your version of Flare, there's a few ways listed in this thread: viewtopic.php?f=6&t=7900&start=25
hjanas
Jr. Propeller Head
Posts: 6
Joined: Wed Dec 10, 2014 12:37 pm

Re: How to make all dropdown texts open by default?

Post by hjanas »

I did it using javascript and togglers:

viewtopic.php?f=9&t=18072&p=95666#p95666

I have not tried it in Flare 11, but it worked well in 9 and 10.
Post Reply