I am using fancybox 2. I was able to upload content to fancybox via AJAX. But it loads the whole page, and I'm only interested in a specific div. In fancybox 1, we could do this by adding a filter to ajax. But I'm not sure how to filter in fancybox 2.
How to filter specific div from loaded AJAX page in fancybox 2?
$(".fancybox").fancybox({ maxWidth : 800, maxHeight : 600, fitToView : false, width : '70%', height : '70%', autoSize : false, closeClick : false, openEffect : 'none', closeEffect : 'none', type : 'ajax', 'ajax' : { dataFilter: function(data) { return $(data).find('#modalArticleContainer')[0]; } });
Disable ajax, but it loads the whole page when I add the filter, and then stops working. So I used to do in fancybox 1.
Subash
source share