Home Forums Porto Template Its any possible to get back to main page and section go to her id (#)?

This topic contains 8 replies, has 3 voices, and was last updated by  Support2 2 months, 2 weeks ago. This post has been viewed 237 times

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #10022842

    majstro7
    Participant

    Hello 🙂 Can you tell me that is any option to get back to section from other site?

    I try to explain it. Please go to my test website http://marfen.eu/WXW_BACKUP/ and when you are in main page can you go to link from nabber “O nas” website go down to section O nas and offset work perfectly. But when you go to “Oferta” ( Its must be on new page 🙁 ) and you want turn back to “O nas” Its go to section “O nas” In main site but don’t have an offset and animation doesn’t work. Is any option to fix it ?

    Best Regards David 🙂


    #10022843

    Support
    Keymaster

    Hello, thanks for your purchase.

    You can use the following script to redirect to the right area:

    (js/custom.js)

    $(window).on('load', function() {
                    if(window.location.hash) {
                                   if($(window.location.hash).get(0)) {
    
                                                   var target = window.location.hash,
                                                                   offset = 90;
                                   
                                                   $('body').addClass('scrolling');
    
                                                   $('html, body').animate({
                                                                   scrollTop: $(target).offset().top - offset
                                                   }, 600, 'easeOutQuad', function() {
                                                                   $('body').removeClass('scrolling');
                                                   });
                                   
                                   }
                    }
    });

    Note that I set 90 to be the offset (header height).

    Kind Regards,

    Jonas


    #10022863

    majstro7
    Participant

    Work perfectly ! 🙂 But have one problem when I back from Oferta to O nas the “Zobacz nasze realizacje” are not active. I mean the “Wszystkie” are not active and anyone image doesn’t show. I have one more question how I can make a UP BUTTON that go to up of website but in mobile phones? On PC the button is but on mobile its doesn’t show and I think that when click for example “O nas” in mobile the section go too far. Can you help me fix it ?


    #10022866

    Support2
    Keymaster

    Hello,

    1) To fix the “Zobacz nasze realizacje” issue, please change the HTML of “sort” items to:

    <ul class="nav nav-pills sort-source" data-sort-id="portfolio" data-option-key="filter" data-plugin-options="{'useHash': false}">

    * Note the “data-plugin-options”.

    2) To show the “back to top” button on mobile, add this code in (css/custom.css):

    html .scroll-to-top.hidden-mobile {
    	display: block !important;
    }

    3) Another issue that i saw in your code is a duplicated “custom.js” script. You can remove the script marked on image below:

    Please, try that and let me know if you need further assistance.

    Kind Regards,

    Rodrigo.


    #10022867

    majstro7
    Participant

    1) Work !:)
    2) I put this to custom.css and in index.html I have src to custom.css but button to top on mobile doesn’t show :/.
    3) Doesn’t work:/ still section go too far in mobile.

    I have one more question to you, I am looking people to help. I bought on theme forest/code canyon a script that I want to put on my website ( this is step contact form ) I need to make one thing to this and I’m looking for someone to make it for me. Of course for extra pay do you want look at this ?


    #10022868

    majstro7
    Participant

    2) Work too 🙂 !


    #10022871

    Support2
    Keymaster

    Hello,

    Your website is returning error 403. We need the site live to inspect your code and send the best solution for your regarding the item 3.

    Regarding a custom work: We work together with a developer who has advanced knowledge in the template (Porto).

    Please, feel free to contact him to discuss about customized tasks with the template.

    His e-mail is: maaprote@gmail.com

    Kind Regards,

    Rodrigo.


    #10022872

    majstro7
    Participant

    I have new link to my website look now http://marfen.eu/stronav1/


    #10022876

    Support2
    Keymaster

    Hello,

    As the header height of your website change on mobile, we need to make a JS condition for that. So, please change the JS code to:

    $(window).on('load', function() {
        if(window.location.hash) {
            if($(window.location.hash).get(0)) {
    
                var target = window.location.hash,
                    offset = ( $(window).width() < 768 ) ? 180 : 90;
    
                $('body').addClass('scrolling');
    
                $('html, body').animate({
                    scrollTop: $(target).offset().top - offset
                }, 600, 'easeOutQuad', function() {
                    $('body').removeClass('scrolling');
                });
    
           }
        }
    });

    * Note that i changed the “offset” variable. Now when be mobile will use 180 of offset, and when not will use 90.

    Please, try that and let me know if you need further assistance.

    Kind Regards,

    Rodrigo.


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