This topic has 39 replies, 13 voices, and was last updated 7 years by rishabh08.

  • Author
  • #3831
     willianlima83
    Participant

    Hi
    There are any solution to keeping scroll bar on the last position when refresh the page?
    🙂

    #3864
     SQadmin
    Keymaster

    It should act like that. I think only Chrome browser takes you at the top of the page then goes to the last location

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3883
     willianlima83
    Participant

    Ok.. Thanks…

    #3884
     willianlima83
    Participant

    I think I didn’t explained the situation I want resolve.
    When I click on menu on my profile page (wall, profile, account, friends, My pictures), it open a new page correctly but on the top.
    Always I click on profile menu, the new page opened go to the top, then everytime I need to scroll down it to see the new page content because the space where the main picture is positioned is very big…
    There are an solution for this situation, please?

    #3885
     willianlima83
    Participant

    When I click on a activity or comment, the page is always fixed on the same place… it’s verry good.. but on profile menu it not happen.. 🙁

    #3900
     SQadmin
    Keymaster

    I see what you are saying now. We will try and find a solution to this

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3947
     willianlima83
    Participant

    Ok.. I’m waiting for this solution 😛
    I know you are a genius… 🙂

    #5337
     SQadmin
    Keymaster

    Hello all 🙂
    This code added to footer.php before the wp_footer() line will make the page open at the buddypress navigation level:

    COPY CODE
    
    <script>
    jQuery(document).ready(function() {
    	jQuery("#item-nav .item-list-tabs a, #subnav a").each(function() {
    		jQuery(this).attr('href',jQuery(this).attr('href')+"#item-nav");
    	});
    });
    </script>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #5355
     willianlima83
    Participant

    wow.. it works very well… thank you very much…
    PS. This code works well without the Sticky Menu, because the Sticky Menu, if enabled, overrides the budpress menu..

    #5809
     Douweboschma
    Participant

    That worked like a charm too! Thanks…

    #5902
     SQadmin
    Keymaster

    To hide the top part when viewing your own profile please add this css to sweetdate-child/style.css or in WP admin – Sweetdate – Styling options – Quick css:

    COPY CODE
    
    .my-account #profile {display:none;}
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #5990
     willianlima83
    Participant

    This code works… but I think is better a little buttom to hide this part on own profile, not hide it automatically… If you included this in a new update is better, but I think it’s not a big problem… It’s good for now..
    Thanks..

    #7958
     topdog
    Participant

    Thanks for the code. It worked to refresh the screen back on the profile menu. However, the css code removes the profile altogether and I don’t want to do that automatically.

    The problem is that the stickly menu is blocking the profile menu so visitors have to scroll up to see their option. But I don’t want to disable the sticky menu complete because it’s useful throughout the rest of the site.

    How can I disable the sticky menu just on the profile page?

    #8056
     Abe
    Keymaster

    You can change it with this to have the nav visible

    COPY CODE
    
    <script>
    jQuery(document).ready(function() {
    	jQuery("#item-nav .item-list-tabs a, #subnav li a").each(function() {
    		jQuery(this).attr('href',jQuery(this).attr('href')+"#main");
    	});
    });
    </script>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #8062
     topdog
    Participant

    @Abe

    I tried the code but the sticky menu is still visible. I want the sticky menu to NOT appear when a user is on any profile page.

    Maybe I’m placing your code in the wrong location. I tried it in the footer.php next to the other code in this thread and I tried it in the function.php but not response. Should I try another file?

    #8115
     Abe
    Keymaster

    My code wasn’t to remove the sticky menu, but to show the page a bit top so the navigation will appear and won’t be covered by the menu. Unfortunately there is no option to remove the sticky for a specific page

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #8175
     Abe
    Keymaster

    Try with this css code to hide the sticky menu:

    COPY CODE
    
    .bp-user .contain-to-grid.sticky.fixed {
        display: none;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #8306
     LKr
    Participant

    Thank you for sharing this code (to keep opening pages at the buddypress navigation level) – it works well with all tabs. But it does not affect if I click on the “Compose” message link (Messages–>Compose) – the Compose message page opens at the very top, still.

    Is there any modification possible to this code that you proposed so that it works on these (second-level) links as well? Thank you!!

    #8396
     Abe
    Keymaster

    Hi, I have updated the code above https://archived.seventhqueen.com/forums/topic/keeping-scroll-bar-on-the-last-position-when-refresh#reply-8056

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #8668
     topdog
    Participant

    The new code works great. Thanks.

    #11738
     shanevie
    Participant
    This reply has been set as private.
    #11994
     Abe
    Keymaster

    Hi, That will modify current structure pretty much. if you want to achieve that you should hire a developer to help you. Thanks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #12605
     Afrostein
    Participant

    Hi Robert,

    How do we get to the footer.php to apply this code you made:

    <script>
    jQuery(document).ready(function() {
    jQuery(“#item-nav .item-list-tabs a”).each(function() {
    jQuery(this).attr(‘href’,jQuery(this).attr(‘href’)+”#item-nav”);
    });
    });
    </script>

    2nd Issue. When I click on that link for your “updated code” nothing happens. Still on this page.

    Thanks.

    #12759
     Abe
    Keymaster

    This is that link https://archived.seventhqueen.com/forums/topic/keeping-scroll-bar-on-the-last-position-when-refresh/#post-8056

    you add the code by connecting to your server by ftp in wp-content/themes/sweetdate

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #21704
     ElectroMagnetic
    Participant

    Hi Abe
    I found the jquery worked well, but did not work on the Profile > edit > submenu items…as my client has a huge profile group an field section.
    I added this into you jquery #profile-edit-form ul.button-nav li a and it seems to work well, but not sure if that is the correct way to approach the problem.
    Please could you check this jquery below and let us all know if its good to go or if its just a hack! and you have a better solution to this.

    <script>
    jQuery(document).ready(function() {
    jQuery(“#item-nav .item-list-tabs a, #subnav li a, #profile-edit-form ul.button-nav li a”).each(function() {
    jQuery(this).attr(‘href’,jQuery(this).attr(‘href’)+”#main”);
    });
    });
    </script>

    Look forward to your input.

    #22026
     Abe
    Keymaster

    That is a good solution and it is fine to use it.
    CHeers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #37462
     neelesh7
    Participant

    Hi,

    Is it possible to add to that script to not scroll back to top when saving changes?

    #37491
     FD
    Participant

    That would be really nice to have a script or a way to reduce the “jumping” up and down while navigating site.

    So my questions are:

    1 – Is is possible to reduce the “jumping” up and down while navigating?
    (To not scroll back to top and then down after saving changes or changing menu tab.)

    2 – Are there a way to make notifications open at the correct level so you don´t have to scroll down
    to see the notification?

    #37703
     Abe
    Keymaster

    @neelesh7 not right now, we will think of something

    @FD this is somehow the same thing on both questions but we will try to think of something to do that

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #37712
     FD
    Participant

    @abe Yes, that´s right. I was in hurry. It would be really nice if you could find a solution. 🙂

    #37763
     neelesh7
    Participant

    Thanks Abe.

    #40390
     wannabe
    Participant

    The whole profile part should be ajax in my opinion. is this on the roadmap?

    #40479
     Abe
    Keymaster

    it is kind of hard @wannabe since is very much dependent on how Buddypress works

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #70947
     topdog
    Participant

    Just purchased the Kleo theme and added this code. It works for top level Buddypress profile menu item but not any sub-menu items.

    Is it possible to extend the code to work sub-menu items?

    #71338
     Abe
    Keymaster

    Hi, I just updated the code here: https://archived.seventhqueen.com/forums/topic/keeping-scroll-bar-on-the-last-position-when-refresh#post-5337

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #71359
     topdog
    Participant

    Code works well. Appreciate the quick reply and fix. Thanks Abe!!!

    #71367
     Abe
    Keymaster

    Glad to help 😉

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #167818
     rishabh08
    Participant

    Hi just purchased the theme, I’m facing same issue with the profile page. I know it’s buddypress but are there no hacks to make just the profile page ajax. Reloading each time on tab selection is making the UX a nightmare.

    #168414
     Abe
    Keymaster

    Hi, unfortunately BuddyPress doesn’t provide a simple way of enabling ajax for the navigation.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #168415
     rishabh08
    Participant

    Hi Abe, there is a more pressing issue I have been waiting for support on, could you look at my latest tickets; thanks.

Viewing 40 posts - 1 through 40 (of 40 total)

The topic ‘keeping scroll bar on the last position when refresh’ is closed to new replies.

Log in with your credentials

Forgot your details?