I need to create a bootstrap 4 layout with an image that sticks to top after the page is scrolled and the image reaches bottom of the header, but after the page is scrolled down to the footer and footer enters viewport the image should start scrolling again with the page. The image should be sticky only on large and extra large bootstrap 4 grids. The behavior I'm looking for should be the same as if the new bootstrap 4 class "sticky-top" was added to the image, only with css and jquery because I can't use sticky-top class due to the lack of browser support. Is there a way to do this with jquery?
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<header>header sticks to top</header>
<div>breadcrumbs that scroll along with the page go here</div>
<div class="row">
<div class="col-12 col-lg-6">
<img src="image.jpg" class="img-fluid" alt="image">
</div>
<div class="col-12 col-lg-6">
<p>Bunch of random text goes here</p>
</div>
</div>
<footer>Footer stuff goes here</footer>