terrymun / Fluidbox

Replicating and improving the lightbox module seen on Medium with fluid transitions.
http://terrymun.github.io/Fluidbox/
Other
2.15k stars 166 forks source link

Dynamic blur overlay image? #166

Closed partitect closed 8 years ago

partitect commented 8 years ago

how can i add dynamic blur overlay image ` $(".ddda a").on('openstart.fluidbox', function () {

        var bakimg = $(this).attr("href");
        $(".overlay-3 .fluidbox__overlay:before").css("background-image", "url(" + bakimg + "))!important")
    });`

this not work :(

terrymun commented 8 years ago

Unfortunately JS do not have access to pseudo-elements, because they are not part of the DOM. Therefore you will have to declare it from within a stylesheet, by either doing so in your CSS, or using JS to inject a <style> element in your document.