Hello, I add this code in the Custom Javascript (Post) in FooBox settings.
$('.fbx-instance').on('foobox.beforeShow', function(e) {
var $element = $(e.fb.item.element), //the anchor tag
$fooboxInstance = e.fb.instance, //the foobox instance
$modal = e.fb.instance.modal.element; //the modal object
//your custom code goes here...
console.log($element.data('data-caption-title'));
e.fb.item.title = $element.data('data-caption-title');
});
I can see in the console the data-caption-title with good info. But nothing appear when fooBox open.
Caroline