On my website, I have a div classed as .slidingDiv that is hidden until the anchor .show_hide is clicked, causing it to slide down. This feature works perfectly when the .slidingDiv is the only content on the page.
However, if there is other content above the .slidingDiv, it doesn't scroll down to reveal itself. Instead, it remains hidden but displayed below the visible content, not pushing the rest of the page up as intended.
Below is the JQuery code being used:
<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 for your help.
Sincerely, Pete