joaopereirawd / animatedModal.js

animatedModal.js is a jQuery plugin to create a fullscreen modal with CSS3 transitions. You can use the transitions from animate.css or create your own transitions.
MIT License
962 stars 207 forks source link

Open Modal from Javascript #12

Open murray484 opened 9 years ago

murray484 commented 9 years ago

What would the best way be to open the modal programmatically from within a javascript function (ie. instead of clicking a link to open the modal, you could tell it to open from within your javascript code)?

natecox commented 9 years ago

+1 for this. Currently it seems that you set a callback on an existing dom element which then opens the modal in the future. It'd be nice to be able to just do so directly.

marcusvmsa commented 9 years ago

+1

adnasa commented 9 years ago

This requires that the caller ($("#demo01").animatedModal(); in the demo) actually returns the bound target object which is something I also vote for.

adnasa commented 9 years ago

@mamute @natecox @murray484 I've opened up a PR #15 and that branch is available in my fork. Please test it and review. If you guys like, I can try to find the time to compile the js and updated my repo