JSFiddle - React, Tailwind, and code Playground

HTML

<div id="button_id">Button...

CSS

#where {
    position:fixed;
    top:0;
    right:50%; }

JavaScript

$(function() {
    $(window).scroll(function() {
        var pos = $('#button_id').offset(),
            top = pos.top - $(window).scrollTop(),
            lft = pos.left - $(window).scrollLeft();
        $("#where").html("Top: " + top + "\nLeft: " + lft);
    });   
});