Featherlight works with no problems but I cannot figure out how to override defaults settings.
I read the documentation, but everything I try does not seems to work. For example, if I want to change openSpeed
, what should I write? I am not using the gallery.
Just modify properties of $.featherlight.defaults
, like this:
$.featherlight.defaults.openSpeed = 500;
As @Marc-AndréLafortune pointed, you can override multiple options using $.extend()
, like that:
$.extend($.featherlight.defaults, {
openSpeed: 1000,
closeSpeed: 1000
});
You can change the default globally with
$.featherlight.defaults.openSpeed = 1000
For multiple settings, you can of course use:
$.extend($.featherlight.defaults, {
openSpeed: 1000,
closeSpeed: 1000
});
Just don't replace the defaults by a different object altogether.
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.