javascript - on load open model popup using bootstrap? -
model opening on click :
<a href="#" data-remodal-target="test" >test</a>
my model code :
<div class="remodal" data-remodal-id="test"> <h3 class="modal-middle-heading">buy</h3> <p>please select desired gift city.</p> <form class="login-form"> <input type="text" placeholder="search city" /> </form> <button>search</button> </div>
how can open model on load ?
assuming using remodal, programmatically open model on onload
event. this:
window.onload = function () { $('[data-remodal-id=test]').remodal().open(); };
see demo
Comments
Post a Comment