I have a site that has .slidingDiv called, which, when the .show_hide anchor is clicked, appears and slides down, which is great when it is the only content on the page.
If there is other content above this div, it does not scroll down and does not show. Instead, it shows a div, but it is off-site, so it really works, but does not push the rest of the content.
Here's jQuery:
<script type="text/javascript"> $(document).ready(function(){ $(".slidingDiv").hide(); $(".show_hide").show(); $('.show_hide').click(function(){ $(".slidingDiv").slideToggle(), 1000; scrollTop: $(this).offset().top }); }); </script>
Thank you very much
Pete
source share