change offset_top dinamyc
Opened this issue · 2 comments
d-kochanzhi commented
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?
jimmyko commented
Why not create a pull request?
steve231293 commented
Hello there
Is this featured added in last version yet?