Default Togglers to Expanded on Page Load

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Default Togglers to Expanded on Page Load

Post by NorthEast »

MaxyDocs wrote:Am I right in thinking that you cannot change the image of the expand all / collapse all button in the topic toolbar proxy - I'm using HTML5 Top Nav?
I've been asked to make the expand all / collapse button a bit clearer so was thinking of adding a named button rather than the current Hamburger looking button.
Change the button image in the topic toolbar skin. On the Styles tab, see Toolbar > Toolbar button > Expand All / Collapse All > Background.
MaxyDocs
Jr. Propeller Head
Posts: 9
Joined: Tue Feb 02, 2016 3:57 am

Re: Default Togglers to Expanded on Page Load

Post by MaxyDocs »

Dave Lee wrote:
MaxyDocs wrote:Am I right in thinking that you cannot change the image of the expand all / collapse all button in the topic toolbar proxy - I'm using HTML5 Top Nav?
I've been asked to make the expand all / collapse button a bit clearer so was thinking of adding a named button rather than the current Hamburger looking button.
Change the button image in the topic toolbar skin. On the Styles tab, see Toolbar > Toolbar button > Expand All / Collapse All > Background.
Cool, I'll give it a whirl, thanks for the guidance and have a great weekend
Kind Regards
Craig
Kolman
Jr. Propeller Head
Posts: 7
Joined: Thu Oct 13, 2016 12:19 am

Re: Default Togglers to Expanded on Page Load

Post by Kolman »

MaxyDocs wrote:
Try this:

Code: Select all

CODE: SELECT ALL
$(document).ready(function() {
   $(".MCDropDownHotSpot").click();
   window.scrollTo(0,0);
});
You wouldn't think that a few lines of script could make a man so happy.
Thanks so much Dave, works a treat.

Am I right in thinking that you cannot change the image of the expand all / collapse all button in the topic toolbar proxy - I'm using HTML5 Top Nav?
I've been asked to make the expand all / collapse button a bit clearer so was thinking of adding a named button rather than the current Hamburger looking button.

Thanks again
Craig
I'm also wondering about this, have you (or anyone else) found a solution?
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Default Togglers to Expanded on Page Load

Post by NorthEast »

Kolman wrote:I'm also wondering about this, have you (or anyone else) found a solution?
Did you see my reply to that just a few posts back?
Dave Lee wrote:Change the button image in the topic toolbar skin. On the Styles tab, see Toolbar > Toolbar button > Expand All / Collapse All > Background.
Kolman
Jr. Propeller Head
Posts: 7
Joined: Thu Oct 13, 2016 12:19 am

Re: Default Togglers to Expanded on Page Load

Post by Kolman »

:o I did not, thank you for pointing it out
CanAussie
Propeller Head
Posts: 87
Joined: Wed Jul 16, 2008 7:45 pm

Re: Default Togglers to Expanded on Page Load

Post by CanAussie »

Hello,

Great posts, thank you so much. So, how would I expand the second drop down instead of the first?

Canaussie
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Default Togglers to Expanded on Page Load

Post by NorthEast »

CanAussie wrote:Hello,

Great posts, thank you so much. So, how would I expand the second drop down instead of the first?

Canaussie
You could use jQuery :eq(n) selector - the number (n) starts at zero, so :eq(1) is the second element of that type.

Code: Select all

$(document).ready(function() {
   $(".MCDropDownHotSpot:eq(1)").click();
   window.scrollTo(0,0);
});
CanAussie
Propeller Head
Posts: 87
Joined: Wed Jul 16, 2008 7:45 pm

Re: Default Togglers to Expanded on Page Load

Post by CanAussie »

Nice...in fact, very nice :)

Thank you, Sir.

Canaussie
arkana
Propeller Head
Posts: 22
Joined: Wed Mar 14, 2018 11:10 pm

Re: Default Togglers to Expanded on Page Load

Post by arkana »

I'm very curious to know what scenarios demand these links being expanded by default. The purpose of these links is to make the topics more compact, and the body of the link content should be optional/obvious to some and only those interested should bother to expand them. Won't expanding them by default defeat the purpose of the links?
Arthur Cui
Flare 2019
lc4466
Propeller Head
Posts: 26
Joined: Tue Jun 18, 2019 10:20 am

Re: Default Togglers to Expanded on Page Load

Post by lc4466 »

EDIT: This slightly updated script is what ended up working for me:

Code: Select all

<script>
$(window).bind("load", function() {
		$(".MCDropDownHotSpot").click();     
	});
</script>
Post Reply