Load JavaScript from a post that’s loading into Fancybox via ajax

You need to apply any javascript after the content is loaded. See the Callbacks tab in documentation.

$(".fancybox").fancybox({
    afterLoad: function(current, previous){
        // initialize your js stuff  
    }
});

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)