-
Notifications
You must be signed in to change notification settings - Fork 207
request: close modal programmatically #24
Comments
+1 It's better to have some sort of API, at least, Please. |
It is fairly easy to do it. Please help yourselves to try it out and let me know how it works. Note that feature/open-api branch diverges from my own master as well 😂 Have fun |
Hey @adnasa thanks for forking this script and adding some open/close API functionality. Only thing is, and excuse my JS / jQuery noobness, but I'm trying to use the API like so:
But I receive a |
@onetrev ooooh, it's been a while since I wrote this but after a quick read on the code, this should work
|
Good news, that was helpful for me to get the script to fire.... Bad news... There are errors now within your edited script. :(
|
Radical, thanks!!! I can now let you know your script works perfectly! Hopefully you get a chance to adjust it in your fork in case anyone comes along and needs it. Sure would be nice if this could be added to the original animatedModal.js repo, but not sure if it's still active. Doesn't look like it. |
@adnasa |
@onetrev code is updated enjoy |
Awesome thanks @adnasa! It worked with the edits you suggested previously, but I dropped the updated version and it continues to work nicely. Thanks again! |
@adnasa: It's great having an open method. However, when I use that method, the z-index set inline on the modal div remains at -9999. So the div remains invisible. |
@sunilw okay... here is a (couple of) thoughts
I highly suggest that we open a PR in this repo to provide a complete solution to the original lib so we no longer have to jump between repos |
Someone has a solution for this?
or If i try to close it, all the time I get |
If you want to be able to do this @esseti you have to use the fork that @joaopereirawd created. And there are details here for how to use it: #24 |
@adnasa has fork that provides a way to open the modal from js.
I'd love to see the ability to close the modal programmatically as well.
This would allow a 'close' event to be invoked in a sequence of events with greater ease.
The text was updated successfully, but these errors were encountered: