manish srivastava Posted on Aug 21, 2020 • Edited on Aug 21, 2020 Pure Javascript Multiple Modals on a Page - Simplest #javascript #showdev #beginners #uiweekly I wanted to use pure javascript for creating many modals on same page.And here is codepen :) Top comments (7) Subscribe Submit Preview Dismiss Collapse Expand shadowtime2000 shadowtime2000 shadowtime2000 Follow If you are looking at this you probably wonder who I am; teenage open source maintainer Education Enough Joined Jul 12, 2020 • Aug 21 '20 Dropdown menu Copy link Hide Try modifying it and publish it as a library. Collapse Expand manish srivastava manish srivastava manish srivastava Follow Director & CEO, GDP CHURN (P) Ltd. Loves coding . Supports open source by funding. Email manishfoodtechs@gmail.com Location India Work Director at Gdp churn pvt ltd Joined Aug 31, 2019 • Aug 21 '20 • Edited on Aug 21 • Edited Dropdown menu Copy link Hide It is pure dead simple. Let it keep be as simple it is... no library.... only pure css and js. Anyway, thanks for good suggestion Collapse Expand Shane McGowan Shane McGowan Shane McGowan Follow Burned out web dev Email contact@shanemcgowan.com Location Ireland Joined Jul 19, 2017 • Aug 21 '20 Dropdown menu Copy link Hide I respect this mentality more than I can express with words Collapse Expand jackdev jackdev jackdev Follow Location UK Joined Aug 28, 2020 • Aug 28 '20 Dropdown menu Copy link Hide hi how would i incorporate the escape key? thannks Collapse Expand manish srivastava manish srivastava manish srivastava Follow Director & CEO, GDP CHURN (P) Ltd. Loves coding . Supports open source by funding. Email manishfoodtechs@gmail.com Location India Work Director at Gdp churn pvt ltd Joined Aug 31, 2019 • Aug 28 '20 Dropdown menu Copy link Hide var KEYCODE_ESC = 27; $(document).keyup(function(e) { if (e.keyCode == KEYCODE_ESC) $('.cancel').click(); }); Collapse Expand jackdev jackdev jackdev Follow Location UK Joined Aug 28, 2020 • Aug 29 '20 Dropdown menu Copy link Hide ooo thanks. is it possible in vanilla javascript? thanks so much. Paul Leech Paul Leech Paul Leech Follow Joined Jul 18, 2021 • Sep 1 '21 Dropdown menu Copy link Hide I converted it to vanilla JS here: codepen.io/Realto619/pen/ZEyWjKm Code of Conduct • Report abuse
Top comments (7)
Try modifying it and publish it as a library.
It is pure dead simple. Let it keep be as simple it is... no library.... only pure css and js. Anyway, thanks for good suggestion
I respect this mentality more than I can express with words
hi how would i incorporate the escape key? thannks
var KEYCODE_ESC = 27;
$(document).keyup(function(e) {
if (e.keyCode == KEYCODE_ESC) $('.cancel').click();
});
ooo thanks. is it possible in vanilla javascript? thanks so much.
I converted it to vanilla JS here: codepen.io/Realto619/pen/ZEyWjKm