Read more

Howto set jQuery colorbox overlay opacity

Martin Straub
December 20, 2013Software engineer at makandra GmbH

Setting the colorbox opacity by hash parameter when initializing doesn't work the way like the documentation Show archive.org snapshot tells you.

  $(selector).colorbox({ ..., opacity: 0.5, ... }); // has no effect
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

The opacity value of 0.5 will be overwritten by the inline style attribute style="opacity: 0.9" that colorbox sets.

To manually set the opacity you have to add the following css rule

  #cboxOverlay { opacity: 0.5 !important; }
Posted by Martin Straub to makandra dev (2013-12-20 15:01)