I was trying to make Fancybox work with Ajax load content and I want to load only a specific div. I tried 2 ways but none worked for some reason.
Can anyone help?
HTML:
<li><a href="http://rezerv.city/local.php?id=2&tip=5&s=1 #plan_mese2" class="fancybox fancybox.ajax">Ajax</a></li>
JavaScript:
$(".newWindow").fancybox({
scrolling: 'auto',
width: '800',
height: '600',
fitToView: false,
autoSize: false,
'type': 'ajax',
'ajax': {
dataFilter: function(data) {
return $(data).find('#plan_mese')[0];
}
}
});