You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 20, 2021. It is now read-only.
I realized that the caption gets created by either taking the alt or the title attribute into account:
Line 288 in jquery.photobox.js
// if no img child found in the link
if( thumbImg ){
captionlink = thumbImg.getAttribute('data-pb-captionlink');
thumbSrc = thumbImg.getAttribute(that.options.thumbAttr) || thumbImg.getAttribute('src');
caption.content = ( thumbImg.getAttribute('alt') || thumbImg.getAttribute('title') || '');
}
IMO it would make more sense to first look for the title, and if that's not filled out use the alt, as alt attribute is required, title optional. Even better would be an option to configure the desired behaviour:
use alt, then title
use title, then alt
use only alt
use only title
In my use case, I would want to only use title text as caption, but there are surely other possible uses. Is there a way to do this already? Or would you consider this a feasible enhancement?
I realized that the caption gets created by either taking the alt or the title attribute into account:
Line 288 in jquery.photobox.js
IMO it would make more sense to first look for the title, and if that's not filled out use the alt, as alt attribute is required, title optional. Even better would be an option to configure the desired behaviour:
In my use case, I would want to only use title text as caption, but there are surely other possible uses. Is there a way to do this already? Or would you consider this a feasible enhancement?