Reputation: 362
Due to performance optimization I want to prevent users from reload fancyboxes they already loaded once. This is my code:
$(document).ready(function() {
$(".fancybox-effects").fancybox({
type : 'ajax',
wrapCSS : 'fancybox-custom'
});
});
Adding this:
$.ajaxSetup({ cache: true });
to the document.ready function doesn't help. Any ideas?
Upvotes: 0
Views: 2184
Reputation: 41143
You could try
$(document).ready(function() {
$(".fancybox-effects").fancybox({
type : 'ajax',
ajax : { cache: true },
wrapCSS : 'fancybox-custom'
});
});
Upvotes: 3