Welcome to RT-Themes Support Forum

If you've purchased an RT-Theme from Themeforest, you can use the forum for your support needs. You will receive much faster support because we can easily see who needs assistance, and also you’ll be able to use search to see if your problem has been solved in the past and find a fix for it without having to wait.
Tutorial Disable Floating Sidebar
  • Is there a way to reverse the behavior of the sidebar? As it is now, the sidebar does not start scrolling until quite far down the page. Is there a way to make it start scrolling from the start, and then stop scrolling with the rest of the content once it reaches the end? (kind of like the last version of boing boing)
  • Hi

    You can turn it off or rewrite the code if you want. However we dont support this. You will have to hire a coder for that.

    I recommend to stop the floating sidebars by deleting the following lines from /js/script.js


    //floating sidebars
    jQuery(window).load(function(){
    var $window = jQuery(window);
    var $sidebar = jQuery(".sidebar");
    var $footer = jQuery(".footer");
    var $content = jQuery(".content");
    var $WPbar = jQuery("#wpadminbar").length;
    var $addHeigth = 0;
    if ($WPbar>0) $addHeigth = 28;

    if($sidebar.length>0){
    var sidebarTop = $sidebar.position().top;
    var sidebarHeight = $sidebar.height()+10;
    var contentHeight = $content.height();
    var footerTop = $footer.position().top;


    if(contentHeight>sidebarHeight){
    $window.scroll(function(event) {
    $sidebar.addClass('fixed');
    scrollTop = $window.scrollTop(),
    topPosition = Math.max(0, (sidebarTop) - scrollTop),
    topPosition = Math.min(topPosition, (footerTop - scrollTop) - sidebarHeight);
    $sidebar.css('top', topPosition+$addHeigth);
    });
    }
    }
    });


    Best regards,
    Neo
  • Ok, thank you.
This discussion has been closed.
All Discussions