title: How to detect position of the Bootstrap modal scrollbar?
body: <p>I'm using JQuery and Bootstrap and I'm loading a modal with an ajax request, so content will be loaded dynamically inside of the modal.</p>
  
  <p>I managed to load more content with a button click (also inside the modal), but I wanted to implement a <a href="https://visualhierarchy.co/blog/wp-content/uploads/2015/09/infinite_scroll.gif" rel="nofollow noreferrer">infinite scroll</a> feature.</p>
  
  <p>However the <code>window.onscroll</code> function didn't seem to work or to recognize the scroll position inside the modal, even if I define it inside the modal after the first ajax request.</p>
  
  <p><strong>Question:</strong> How can I detect if a specific element <em>inside</em> the modal is visible to the user to load more content automatically?</p>