skip to Main Content

block any click if modal is visible – CPanel

<body> <div id='container'> <div id='cpanel' style="position:fixed;">525</div> </div> <div class='modal' style="position:fixed;>323</div> </body> I want to prevent any click on container and its children if modal is visible. js $('#container, #cpanel').click(function(){ if ($('.modal').is(':visible')) {return false;} }); Click on container is blocked, but…

VIEW QUESTION
Back To Top
Search