midzer / tobii

An accessible, open-source lightbox with no dependencies
https://midzer.github.io/tobii/demo/
MIT License
200 stars 20 forks source link

can be used inside js function? #32

Closed franMx closed 3 years ago

franMx commented 4 years ago

Hi, not an issue per se, more of a question. Can tobbi be used inside a js function?

Used another library previously that allowed:

function pdfl(){
    var lightbox = lity('capital.html');
}

Is it possible to use tobii similar to that?

Thanks.

midzer commented 3 years ago

To be honest, I dont know exactly. Have you tried it, @franMx ? From my programming perspective, lightbox instance should be in global scope, because it is running all the time. Inside a function it may be garbage collected.

franMx commented 3 years ago

Hi midzer, ended up using a different library, as I wasn't able to get around some issues.