Hi, I'm trying to get notified when attachment and targetAttachment element change: top and left positions.
I'm initializing tether with this settings:
vartether=newTether({attachment: 'bottom center',targetAttachment: 'top center',});As you can see. attachment is vertically positioned bottom and targetAttachment is vertically positioned with top.
When I scroll the page I expect to change attachment to top and targetAttachment to bottom. And I want to receive this info on update event like this:
tether.on('update',function(event){$('.element').html(` attachment.top: ${event.attachment.top} targetAttachment.top: ${event.targetAttachment.top} `)});And it works first time 🎉 .
But if I scroll .element to initial position targetAttachment and attachment vertical position is not updated to their initial position.
Check this gif and see how

Code pen with example:
https://codepen.io/andresgutgon/pen/JMYgyx?editors=1000
Hi, I'm trying to get notified when
attachmentandtargetAttachmentelement change:topandleftpositions.I'm initializing tether with this settings:
As you can see.
attachmentis vertically positionedbottomandtargetAttachmentis vertically positioned withtop.When I scroll the page I expect to change
attachmenttotopandtargetAttachmenttobottom. And I want to receive this info onupdateevent like this:And it works first time 🎉 .
But if I scroll
.elementto initial positiontargetAttachmentandattachmentvertical position is not updated to their initial position.Check this gif and see how

Code pen with example:
https://codepen.io/andresgutgon/pen/JMYgyx?editors=1000