Git Product home page Git Product logo

Comments (5)

aheinze avatar aheinze commented on June 19, 2024

should be possible now after this commit:

3cb1bad

from uikit.

unixversal avatar unixversal commented on June 19, 2024

Works. The only thing that still does not work properly is to close the 2nd modal box. I can only exit the trail by adding a regular href link

<div>
    <h2>Multiple Modal</h2>
    <button class="uk-button" data-uk-modal="{target:'#modal1'}">Open Modal 1</button>

</div>

<!-- This is the modal 1-->
<div id="modal1" class="uk-modal">
    <div class="uk-modal-dialog">
        <h2>Modal 1</h2>
        <button class="uk-button uk-modal-close" data-uk-modal="{target:'#modal2'}">Open Modal 2</button>       
    </div>
</div>


<!-- This is the modal 2-->
<div id="modal2" class="uk-modal">
    <div class="uk-modal-dialog">
        <h2>Modal 2</h2>
        <a href="?cancel">Close Modal 2</a>
    </div>
</div>

from uikit.

aheinze avatar aheinze commented on June 19, 2024

Hi , this is the way you should implement it:

<div>
    <h2>Multiple Modal</h2>
    <button class="uk-button" data-uk-modal="{target:'#modal1'}">Open Modal 1</button>

</div>

<!-- This is the modal 1-->
<div id="modal1" class="uk-modal">
    <div class="uk-modal-dialog">
        <h2>Modal 1</h2>
        <button class="uk-button" data-uk-modal="{target:'#modal2'}">Open Modal 2</button>      
    </div>
</div>


<!-- This is the modal 2-->
<div id="modal2" class="uk-modal">
    <div class="uk-modal-dialog">
        <h2>Modal 2</h2>
        <a class="uk-modal-close" href="#">Close Modal 2</a>
    </div>
</div>

from uikit.

unixversal avatar unixversal commented on June 19, 2024

Thanks for catching up. Modified + copied your code 1 to 1 but cannot exit on 2nd Modal "Close Button".
The box remains open and adds # to the url > test.html#

Any other suggestions?

from uikit.

unixversal avatar unixversal commented on June 19, 2024

My bad. Must have included the old modal function in the test file. Seems to work fine now. Thanks again!

from uikit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.