admin管理员组

文章数量:1389761

since the new accordion widget of Elementor uses content-visibility: hidden for its contents before a tab is opened, it's not possible to make certain elements within visible before that.

But that's exactly what I need in this case. Is there any way to disable the method of hiding content within closed tabs, so I can display a certain absolute positioned element before the tab is opened? I'm aware that content then gets rendered for all tabs BEFORE opened, but that's okay in this case.

All attempts to override content-visibility: hidden; set for the slot:not([name]) selector for each accordion tab failed, no matter if CSS with !important or JS keeping shadow DOM in mind..

Any ideas for another approaches I'm overlooking here?

since the new accordion widget of Elementor uses content-visibility: hidden for its contents before a tab is opened, it's not possible to make certain elements within visible before that.

But that's exactly what I need in this case. Is there any way to disable the method of hiding content within closed tabs, so I can display a certain absolute positioned element before the tab is opened? I'm aware that content then gets rendered for all tabs BEFORE opened, but that's okay in this case.

All attempts to override content-visibility: hidden; set for the slot:not([name]) selector for each accordion tab failed, no matter if CSS with !important or JS keeping shadow DOM in mind..

Any ideas for another approaches I'm overlooking here?

Share Improve this question asked Mar 13 at 11:00 BradleyBradley 1093 silver badges17 bronze badges 1
  • There is absolutely no way to make elements visible if their parent element is set to content-visibility: hidden; or to override the JS injected CSS for Elementor's nested accordions. I fixed this by just moving the certain elements within the DOM to make them visible keeping the rest of the accordions content untouched. – Bradley Commented Mar 13 at 14:54
Add a comment  | 

1 Answer 1

Reset to default 0

You likely can't directly make an element inside a closed new accordian tab visible outside before it's opened due to Elementor's optimization. Consider these shorter alternatives:

  1. Move the visible element next to the accordion itme and position it visually.
  2. Use the older toggle widget if it suits your needs.
  3. Build a custom accordion like structure with HTML/CSS/JS.

本文标签: javascriptMake element visible within Elementor39s accordion widget before item is openedStack Overflow