I have set up this configuration inside my html, but I keep getting an error (Unexpected identifier). Please help!
$(document).ready(function(){
$(".fancybox").fancybox({
closeBtn : false,
helpers : {
title : {
type : 'inside'
},
buttons : {}
},
afterLoad : function() {
this.title = (this.index + 1) + '. ' + longNames[this.index];
}
error : '<p class="fancybox-error">'+fnbx_err+'</p>',
closeBtn : '<a title="'+fnbx_clo+'" class="fancybox-item fancybox-close" href="javascript:;"></a>',
next : '<a title="'+fnbx_nex+'" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
prev : '<a title="'+fnbx_pre+'" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
});
});
The problem is not because of the variables. You forgot to put the last part inside
tpl.