New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toggle not working in overlay opened from a page with tabs #8577
Comments
I should have added that I am ajaxing the modal including toggle buttons. If I ajax just the content but have the buttons on the page from which I am making ajax call, things are working fine. |
....and I just noticed that all works as it should if I add class |
You might want to specified the CSS selector in your toggle plugin configuration. Like a CSS selector that only target your middle screen overlay. It is the first item in the configuration option in the toggle documentation: https://wet-boew.github.io/wet-boew/docs/ref/toggle/toggle-en.html |
@duboisp <div id="toggle-items">
<div class="btn-group">
<button type="button" class="btn btn-primary wb-toggle" data-toggle='{"selector": ".toggle-element", "parent": "#toggle-items", "type": "on"}'>Open all</button>
<button type="button" class="btn btn-primary wb-toggle" data-toggle='{"selector": ".toggle-element", "parent": "#toggle-items", "type": "off"}'>Close all</button>
</div>
<details id="collapse-1" class="toggle-element">
<summary>Collapse 1</summary>
<p>Collapse 1 content</p>
</details>
<details id="collapse-2" class="toggle-element">
<summary>Collapse 2</summary>
<p>Collapse 2 content</p>
</details>
<details id="collapse-3" class="toggle-element">
<summary>Collapse 3</summary>
<p>Collapse 3 content</p>
</details>
</div> ...but it's not working unless I have class |
Tested it in 3 browsers: Chrome v.72.0.3626.109 IE 11 |
Using the code below I had no issues.
|
That was with the latest version of WET what are you using? |
I am using Middle screen overlay. The overlay contains
<details>
element that I am trying to expand/collapse using toggle plugin. The "On" or "Toggle" functionality works initially to expand<details>
elements but "Off" or "Toggle" can't collapse them back.This only happens if the overlay is opened from the page that contains tabs. If I remove
class="wb-tabs"
, the toggle is working.The text was updated successfully, but these errors were encountered: