I'm trying to change the global template of the Clearing plugin (responsive lightbox gallery) but the documentation doesn't say anything about how to do it programatically; the data-options
way is explained but nothing more.
Looking into the code I've seen that there is actually a template in the Foundation.libs.clearing...
namespace. After some tries I've arrived to this:
// Include scripts
// Change template
Foundation.libs.clearing.settings.templates.viewing = '' +
'<a class="clearing-close">×</a>' +
'<div class="visible-img" style="display: none"><div class="clearing-touch-label"></div><img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs%3D" alt="" />' +
'<p class="clearing-caption"></p><a class="clearing-main-prev"><span></span></a>' +
'<a class="clearing-main-next"><span></span></a></div>';
// Init
$(document).foundation();
It works, but I'm not sure if I can trust this as it's not documented... any better idea? Maybe there is an API for this...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.