Let's say I have a div, and that div should have a background-image:url(foobar.png). Also, however, foobar.png's opacity should be set to 40% so that the background image is translucent. How can I do this?
If this is not possible without JavaScript, is there an example script I can refer to? Something like this?
jQuery.fn.fadedBgImg = function(url, opacity) {
// Create block element that fills `this` element
// Set z-index of said element to lowest
// Set opacity of said element to 40%
// Insert said element into parent
}