Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #823003

    Rue Nel
    Moderator

    Hello There,

    Please update your code and use this instead:

    (function($) {
            $.fn.scrollBottom = function() {
                return $(document).height() - this.scrollTop() - this.height();
            };
    
            var $el = $('.x-sidebar right>div');
            var $window = $(window);
    
            $window.bind("scroll resize", function() {
                var gap = $window.height() - $el.height() - 10;
                var visibleFoot = 172 - $window.scrollBottom();
                var scrollTop = $window.scrollTop()
    
                if(scrollTop < 172 + 10){
                    $el.css({
                        top: (172 - scrollTop) + "px",
                        bottom: "auto"
                    });
                }else if (visibleFoot > gap) {
                    $el.css({
                        top: "auto",
                        bottom: visibleFoot + "px"
                    });
                } else {
                    $el.css({
                        top: 0,
                        bottom: "auto"
                    });
                }
            });
    })(jQuery);

    We would loved to know if this has work for you. Thank you.

    #823798

    Nicholas
    Participant

    Thanks for the reply.

    No luck unfortunately… will report back if I find a solution

    #823865

    Nicholas
    Participant

    Any tips how to possibly adapt this code? http://jsfiddle.net/FDv2J/3/

    #824257

    Rad
    Moderator

    Hi there,

    That code is only applicable for that structure, doable using same idea but for X theme structure. And it’s the reverse of what you’re currently want to achieve. The sample stop scrolling at the top box.

    I like to help, but this seems like out of our capability. Maybe this is a good feature to have, I’ll take a note of it 🙂

    Thanks!