i using materialize.js (materializecss framework) development of responsive html pages. want have confirm dialog requirement meterialize.js doesn't support it. materialize.js not having confirm dialog or unable find it? how can achieve in materialize.js?
i solved way:
<div id="md1" class="modal"> <div class="modal-content"> <h4>please confirm</h4> <p>are sure proceed?</p> </div> <div class="modal-footer"> <a href="#" class="waves-effect waves-red btn-flat" onclick="$('#md1').closemodal(); return false;">cancel</a> <a href="#" class="waves-effect waves-green btn-flat" id="md1_yesbtn">yes</a> </div> </div> <a class="waves-effect waves-light btn" href="mylandingpage.html" onclick="showmodal(this, 'md1'); return false;">proceed</a> <script> function showmodal(but, modal){ $('#' + modal).openmodal(); $('#' + modal + '_yesbtn').click(function(){ $('#' + modal).closemodal(); document.location = but.href; }); } </script>
Comments
Post a Comment