-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
allow multiple css class triggers on element #73
Comments
Hi @jrevillini, Sounds like a good feature! Not sure how/if I would do this for shortcodes but the included JS should definitely support this. Thanks, Jory |
Sure, happy to work on it! I have a feeling the current JS stops after it finds the first action-class on something. I'll see what I can do. Enjoy your holiday! |
Hi @jrevillini Been looking at this a bit more. So multiple triggers won't make any sense. If you open a sidebar the JS will auto close the other open sidebar if there is one. In other words, all triggers fire but they won't do anything.
This would be the same as adding a trigger that just opens For closing all sidebars you can use: |
Closing this issue in favor of #76 |
Description
Describe the solution you'd like
I'd like to be able to add multiple classes to a button which trigger ocs events. For example, if I have 2 slidebars with ids
x
andy
, I'd like to have a button that closesx
and opensy
like so:<button class='ocs-close-x ocs-open-y'>open y, close x</button>
or maybe close both
x
andy
<button class='ocs-close-x ocs-close-y'>close all</button>
Is your feature request related to a problem? Please describe.
No, it'd just be a nice-to-have.
Other notes
When I add two of such classes, it will attach the trigger based on the first
ocs-{action}-{id}
class, but it ignored the others.Describe alternatives you've considered
I can use the JS API to do it ...
The text was updated successfully, but these errors were encountered: