WordPress.org

Ready to get started?Download WordPress

Forums

Ajaxify WordPress Site(AWS)
[resolved] When posts load, you can't see the top - have to scroll up (21 posts)

  1. chambo622
    Member
    Posted 1 year ago #

    Hello,

    I have the plugin installed at http://www.team3309.org

    When I click on a post on the homepage, it loads, but you can't see the top of it - you have to scroll up.

    How can this be fixed?

    http://wordpress.org/extend/plugins/ajaxify-wordpress-site/

  2. manishkrag
    Member
    Plugin Author

    Posted 1 year ago #

    you have to use scrollto function in ajaxify.js file

  3. chambo622
    Member
    Posted 1 year ago #

    I don't understand. Am I making changes to the ajaxify.js file? What would I change?

  4. mmuradov
    Member
    Posted 1 year ago #

    Hello!
    Please explain in detail how to use scrollto function.

  5. manishkrag
    Member
    Plugin Author

    Posted 1 year ago #

    $content.html(contentHtml)
    .ajaxify()
    .css('text-align', '')
    .animate({opacity: 0, visibility: "visible"}).animate({opacity: 1},800);

    Replace above code by below:

    $content.html(contentHtml)
    .ajaxify()
    .css('text-align', '')
    .animate({opacity: 1, visibility: "visible"})
    .animate({scrollTop: $("#' + container_id").offset().top }, 2000);

    Hope this will solve you guys problem :)

  6. chambo622
    Member
    Posted 1 year ago #

    For some reason I made that change but the behavior does not seem to be different at all.

  7. mmuradov
    Member
    Posted 1 year ago #

    Here's how I create page scroll
    The file ajaxify.js find string

    / / Complete the change
    if ($ body.ScrollTo | | false) $ body.ScrollTo (scrollOptions);

    and above the insert

    jQuery ('html, body'). animate ({scrollTop: 0}, 0);

  8. mmuradov
    Member
    Posted 1 year ago #

    Sorry for my english
    If anything is unclear, please contact me try to explain.

  9. chambo622
    Member
    Posted 1 year ago #

    I think I did what you just suggested...but still, it does not scroll to the top? The behavior seems unchanged.

    Can you try it and tell me what you see? http://www.team3309.org

  10. mmuradov
    Member
    Posted 1 year ago #

    In your file ajaxify.js, no line jQuery('html,body').animate({scrollTop: 0}, 0); // Scroll the page up

  11. chambo622
    Member
    Posted 1 year ago #

    That's what I did - I inserted the line

    jQuery ('html, body'). animate ({scrollTop: 0}, 0);

    right above

    / / Complete the change
    if ($ body.ScrollTo | | false) $ body.ScrollTo (scrollOptions);
  12. mmuradov
    Member
    Posted 1 year ago #

    This script tried to disconnect

    <script type="text/javascript">
    function window_onload() {
      window.addEventListener("scroll",navbar_reset_top,false);
    }
    var navbar_top=210;
    function navbar_reset_top() {
      var scrollTop=document.documentElement.scrollTop||document.body.scrollTop;
      if(scrollTop>navbar_top&&access.className==="navbar_absolute") {
        document.getElementById("access").className="navbar_fixed";
      }
      else if(scrollTop<navbar_top&&access.className==="navbar_fixed") {
        document.getElementById("access").className="navbar_absolute";
      }
    }
    </script>

    Possible conflict of what that script.

  13. chambo622
    Member
    Posted 1 year ago #

    So you think my navbar script is interfering with the page scrolling? Any suggestions on a fix?

  14. mmuradov
    Member
    Posted 1 year ago #

    I checked your file ajaxify.js on my site it does not work. Try to set my file

  15. mmuradov
    Member
    Posted 1 year ago #

  16. chambo622
    Member
    Posted 1 year ago #

    Works perfectly! Thank you so much.

  17. mmuradov
    Member
    Posted 1 year ago #

    you are welcome

  18. manishkrag
    Member
    Plugin Author

    Posted 1 year ago #

    Check the latest version :)

  19. tlamarca
    Member
    Posted 1 year ago #

    Is this what I would need to do to have the pages always scroll to the top of the page rather than the top of the container?

  20. mtarkhov
    Member
    Posted 1 year ago #

    Ok I've tried every solution and none of them worked in current plugin version.. Any ideas? Now it's stuck and scroll not working at all

  21. Andrew
    Forum Moderator
    Posted 1 year ago #

    Mtarkhov, you can create your own thread if the support provided in this thread does not suffice.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.