Tagged: x
-
AuthorPosts
-
August 29, 2016 at 3:54 pm #1152378
fsyingcParticipantHello,
How do I push the content dock over just a little bit to the left so it doesn’t cover up the “Scroll Up” button that also appears once a user has scrolled down the page? I want to keep the dock on the right side if possible instead of moving it to the left.
Wordpress: 4.6
X version: 4.6.1
Cornerstone: 1.3.1Scroll down and see the content dock covering the scroll button currently.
Thank you!
August 29, 2016 at 3:54 pm #1152379
fsyingcParticipantThis reply has been marked as private.August 29, 2016 at 11:52 pm #1152799
FriechModeratorHi There,
Thanks for writing in! You can add this under Custom > JavaScript in the Customizer.
jQuery(document).ready(function($) { $.fn.scrollBottom = function() { return $(document).height() - this.scrollTop() - this.height(); }; var executed = false; var windowObj = $(window); var body = $('body'); var bodyOffsetBottom = windowObj.scrollBottom(); var bodyHeightAdjustment = body.height() - bodyOffsetBottom; var bodyHeightAdjusted = body.height() - bodyHeightAdjustment; var contentDock = $('.x-content-dock'); function sizingUpdate() { var bodyOffsetTop = windowObj.scrollTop(); if ( bodyOffsetTop > ( bodyHeightAdjusted * 0.5 ) ) { if ( ! executed ) { executed = true; contentDock.toggleClass('x-content-dock-off').toggleClass('x-content-dock-on').css('right', '50px'); } } $('.x-close-content-dock').click(function(e) { e.preventDefault(); contentDock.toggleClass('x-content-dock-off').toggleClass('x-content-dock-on').css('right', '-500px'); }); } windowObj.bind('scroll', sizingUpdate).resize(sizingUpdate); sizingUpdate(); });Hope it helps, Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1152378 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
