sticky-kit
sticky-kit copied to clipboard
change offset_top dinamyc
I added a feature to change the offset top, when we need to show two or more sticky elements in page one under another.
refresh = function (event, opts) {
if (opts == null) {
opts = { };
}
if (opts.offset_top != null && offset_top !== opts.offset_top) {
offset_top = opts.offset_top;
recalc_and_tick();
}
};
elm.on("sticky_kit:refresh", refresh);
using
.on('sticky_kit:stick', function (e) {
$("#element").trigger('sticky_kit:refresh', [{ offset_top: fixTop }]);
});
very usefull, can you add it to origin script?
Why not create a pull request?
Hello there Is this featured added in last version yet?