Giter Club home page Giter Club logo

Comments (5)

nolimits4web avatar nolimits4web commented on May 13, 2024

Right, good catch. Will add this feature.
At the moment you can add it dynamically to body and call app.popup() method. Or you can put it inside of page and within callback move it from page to body, that should make a trick:

$$(document).on('pageInit', function (e) {
   var page = e.detail.page;
   var pagePopup = $$(page.container).find('.popup);
   if(pagePopup.length>0) {
       $$('body').append(pagePopup);
       // if you need to open it right now:
       myApp.popup(pagePopup);
   }
});

from framework7.

oliverschloebe avatar oliverschloebe commented on May 13, 2024

Thanks for adding it in the future! For now I'm using a workaround close to your suggestion.

I'm adding "empty" popup markup into the main page's markup, and use the onPageAfterAnimation event to add the contents to the empty popup DOM nodes after the page animation has finished.

Works for me, but it's kinda inconvenient.

Nonetheless, thanks for the great framework! 😍

from framework7.

nolimits4web avatar nolimits4web commented on May 13, 2024

Ok, it is already in dev version, but you have to pass full popup html, you can use it like

myApp.popup('<div class="popup">Hello, <a href="#" class="close-popup">close me</a></div>', true);

the last boolean parameter is removeOnClose, if true (by default it is true) popup will be removed from DOM after you close it

from framework7.

oliverschloebe avatar oliverschloebe commented on May 13, 2024

Coolio, thanks!

from framework7.

nolimits4web avatar nolimits4web commented on May 13, 2024

Ok, closing the issue. Reopen if you'll have problems with it

from framework7.

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.