No fixed semi-transparent background when calling Featherlight manually via js

87 views Asked by At

hoping I could see an example of how to enable the background overlay when calling Featherlight manually. I'm using a simple string containing a div as the content Thanks for any help!

1

There are 1 answers

0
teezeCrost On

The answer was to simply use 'beforeContent' in config similar to the following:

featherlightConf={
    type: 'html',
    beforeContent: function(event){
        $("div.featherlight").css("background", "rgba(0,0,0,.5)")
    }
};