I want to make a div which will show only on scrolling … Reference website [https://www.fastcomet.com/pricing](url)
<script><br/> $(window).scroll(function() {<br/> if ($(this).scrollTop()>300)<br/> {<br/> $('.myDiv').hide(1000);<br/> }<br/> else<br/> {<br/> $('.myDiv').show(1000);<br/> }<br/> });<br/> </script>
<script>function sticktothetop() {<br/> var window_top = $(window).scrollTop();<br/> var top = $('#stick-here').offset().top;<br/> if (window_top > top ) {<br/> $('#stickThis').addClass('stick');<br/> $('#stick-here').height($('#stickThis').outerHeight());<br/> } <br/> else {<br/> $('#stickThis').removeClass('stick');<br/> $('#stick-here').height(0);<br/> }<br/> }<br/> $(function() {<br/> $(window).scroll(sticktothetop);<br/> sticktothetop();<br/> });<br/> </script><br/> <section><br/> <div id="stick-here"></div><br/> <div class="sticky-plans fixed-top" id="stickThis"><br/> <div class="container"><br/> <div class="row"><br/> <div class="col-lg-3 displaynone"><br/> <h4>Choose Your Plan</h4><br/> </div><br/> <div class="col-lg-9 col-12"><br/> <div class="row"><br/> demo </div><br/> </div><br/> </div><br/> </div><br/> </div><br/> </div><br/> <div class="container"> <p class="special-text">Testing</p><br/> </div><br/> </section>
Help @shobha spread the word by sharing this article on Twitter...