Giter VIP home page Giter VIP logo

Comments (4)

usb248 avatar usb248 commented on July 24, 2024

Just read the documentation ....

$(window).load(function() {
var options = { };
$('[data-remodal-id=modal]').remodal(options).open();
});

from remodal.

madhuco avatar madhuco commented on July 24, 2024

Hmmm.... I tried that, but it didn't work for me. In the end I used this:

$(document).ready(function () {
$('body').addClass('remodal_lock remodal_active');
$('.remodal-overlay').show();
$('.remodal').css({
'visibility': 'visible'
});

});

Thanks for your help!

from remodal.

vodkabears avatar vodkabears commented on July 24, 2024

@madhuco you have the instance, get it and open it: https://github.com/VodkaBears/Remodal#methods. Or remove the remodal class to initialize it with JS.

$(document).ready(function () {
$('body').addClass('remodal_lock remodal_active');
$('.remodal-overlay').show();
$('.remodal').css({
'visibility': 'visible'
});
});

Your solution is bad.

from remodal.

bikify avatar bikify commented on July 24, 2024

Exactly this is the code for pageLoad for Remodal.
html:

 <div class="remodal" data-remodal-id="modal">
    <h1>Remodal</h1>
    <p>
        Flat, responsive, lightweight, fast, easy customizable modal window plugin
        with declarative state notation and hash tracking.
    </p>
    <p>
        Minified version size: ~4kb
    </p>
    <br>
    <a class="remodal-cancel" href="#">Cancel</a>
    <a class="remodal-confirm" href="#">OK</a>
</div>

JS:

$(function(){
var inst = $.remodal.lookup[$('[data-remodal-id=modal]').data('remodal')];
inst.open();
});

checkout this fiddle

from remodal.

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.