peer
peer

Reputation: 45

Fancybox add script to Ajax content

I am using fancyBox to display my content in Ajax mode. I want to add mCustomScrollbar to the scrollbar of a div in the displayed content but it is not showing. On the page of the content the mCustomScrollbar is working fine, but not in the fancyBox Ajax window.

I presume I have to call the second script with beforeLoad or beforeShow callbacks but neither is working.

    beforeShow: function(){
        $(".textItem").mCustomScrollbar();
    }

Is this at all possible?

Thanks a lot for any help :)

Upvotes: 1

Views: 218

Answers (1)

Dave
Dave

Reputation: 4436

 afterShow: function(){
    $(".textItem").mCustomScrollbar();
}

Upvotes: 2

Related Questions