Hide/Show div button setting does not remain on page change

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
EVO_VV
Registered User
Posts: 51
Joined: Tue Feb 13, 2018 3:11 pm

Hide/Show div button setting does not remain on page change

Post by EVO_VV » Fri Oct 19, 2018 4:44 pm

I'm using phpBB 3.2.1 and Prosilver with some edits.

At the top of my board, below a bar menu, I have a bootstrap carousel that functions as a site navigation menu.
However, it does take up some room so I would like to be able to Hide/Show it under the control of the user.

Currently the HTML for the button on the Bar Menu is :-

Code: Select all

<li>
<button type="button" class="btn-slider" data-toggle="collapse" data-target=".carousel-inner" aria-expanded="true">Hide/Show Slider</button>
</li>
and the div to hide is :-

Code: Select all

<div class="carousel-inner collapse in">
Which works as intended and Shows/Hides the carousel when clicked.
If the carousel is hidden and I navigate to another page the new page shows the carousel.

How can I make it so that the carousel remains hidden until the button is clicked again.

From what I could find it seems it should be possible using aria-expanded
I have tried :-

Code: Select all

.carousel-inner[aria-expanded="false"] {
  display: none;
}
and :-

Code: Select all

[aria-expanded="false"] .carousel-inner {
  display: none;
}
but neither of those work.

I also found the 'hidden checkbox' method and tried that but failed miserably to get that to work either.

Could any of you erudite gentlemen point me in the right direction to solve this please.

User avatar
Hanakin
Infrastructure Team Member
Infrastructure Team Member
Posts: 757
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: Hide/Show div button setting does not remain on page change

Post by Hanakin » Sun Oct 21, 2018 2:33 am

you need to use cookies

Post Reply

Return to “[3.2.x] Styles Support & Discussion”

Who is online

Users browsing this forum: jaccol55 and 3 guests