First, wrap any text or content that you want to show in the scroll in a single div so that you can show the hiding of the div depending on the scroll. Write two classes for your target div.
Your CSS:
.BeforeScroll { height: 100px; width: 100%; . . display: none; } .AfterScroll { height: 100px; width: 100%; . . display: block; }
Your HTML:
<div id = "divToShowHide" class = "BeforeScroll">Content you want to show hide on scroll</div>
Your Script:
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js" type="text/javascript"></script> <script type = "text/javascript"> $(document).ready(function(){ </script>
Hope this solves your problem.
Saurabh palatkar
source share