I need to get the offset of a sibling of the current affixed element. Is this possible? I was hoping to use something like:
<!-- language: lang-js -->$('.affixed').affix({
offset: {
top: 150,
bottom: function() {
return $(this).siblings('p').offset().top;
}
}
});
But this
is just a {top:X, bottom:Y}
object and not the actual element. I have multiple .affixed
elements that I need to affix dynamically.