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

Multiple modal calls one modal #30

Closed Baswazz closed 8 years ago

Baswazz commented 8 years ago

One modal with multiple calls does not work. It only works with the first call, the rest of the calls do not trigger the modal.

Multiple calls:

<a id="demo02" href="#modal-02">DEMO02</a>
<a id="demo02" href="#modal-02">DEMO02</a>
<a id="demo02" href="#modal-02">DEMO02</a>

Modal:

        <!--DEMO02-->
        <div id="modal-02">
            <div  id="btn-close-modal" class="close-modal-02">
                CLOSE MODAL
            </div>

            <div class="modal-content">
                <!--Your modal content goes here-->
            </div>
        </div>
Baswazz commented 8 years ago

Found the solution myself. It's because of the id that is unique. Changing it to a class fixed it.