Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to disable background when popup open in javascript

#modal {
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  border:solid 1px #000;
  display:none;
  background-color:#fff;
}

#overlay {
  position:fixed;
  left:0;
  top:0;
  width:100vw;
  height:100vh;
  display:none;
  background-color:#000;
  opacity:0.5;
}
Comment

how to disable background when popup open in javascript

function openModal() {
  $("#overlay").css({"display":"block"});
  $("#modal").css({"display":"block"});
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript onclick event add html element 
Javascript :: dynamic operator javascript if statement 
Javascript :: uppy count files from javascript 
Javascript :: k6 control a live k6 test 
Javascript :: prototip 
Javascript :: check if a package is compatible with node 14 
Javascript :: how to go back old tab closing new tab in js 
Javascript :: react grid generator 
Javascript :: remove event ondestroy playcanvas 
Javascript :: what does bang at the end of a statement mean for in typescript 
Javascript :: swapping java primitives values 
Javascript :: wrap three three set div in a single div 
Javascript :: xpath last node 
Javascript :: setting a date range using yup on react date picker 
Javascript :: javascript array get element by index 
Javascript :: online regex generator based on string 
Javascript :: Collision between two div vanillaJS no detection 
Javascript :: angular ng build setting body min-width 
Javascript :: Change the content of ALL the p tags 
Javascript :: how to reload page with router next js 
Javascript :: Import UI library modularized in nuxtjs 
Javascript :: format currency javascript 
Javascript :: js comment out 
Javascript :: on inline style change 
Javascript :: regex match but ignore part 
Javascript :: how can i use two api at the same time in angular 
Javascript :: replace then replace back 
Javascript :: how to cookie set in node js 
Javascript :: closing all open files vscode 
Javascript :: javascript replace url on sentence as achor 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =