I have a div and after I click a button, I would like the div to appear (which I can do), but I would like the whole background to become darker too (this is inline with overlay
First, for opacity, you don't set a negative number. $('html').css('opacity','1');
is solid and completely visible, and $('html').css('opacity','0');
is completely invisible. Anything in between (0.2, 0.5, 0.7) gets more visible the close it is to 1.
Second, to make the background darker you can do this: