Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • jscarfe Friend
    #187436

    I’d like to add a “back-top-top” button in the Brisk template. I’ve copied over the code in the template’s “navhelper” file from the Fubix template, along with the CSS. Basically, both templates’ navhelper now look identical, but I’m missing the final step since clicking the “to-top” graphic does nothing. Any help would be greatly appreciated!

    Thanks!

    phong nam Friend
    #492684

    Hi,

    In order to make “Back to top” work, follow below steps:

    1. Copy attached js file into path: <blockquote>templatesja_briskjs</blockquote>
    2. Open <blockquote>templatesja_brisketcassets.xml</blockquote>, then add below text at 5th line:

    <file>js/jquery.easing.1.3.js</file>

    3. Open <blockquote>templatesja_briskjsscript.js</blockquote>, add below codes at line 17th:

    // back to top
    (function(){
    $ja('#back-to-top').on('click', function(){
    $ja('html, body').stop(true).animate({
    scrollTop: 0
    }, {
    duration: 800,
    easing: 'easeInOutCubic',
    complete: window.reflow
    });

    return false;
    });
    })();

    * Don’t forget to inform me your result.

    Leo


    1. jquery.easing.1.3.zip
    jscarfe Friend
    #493266

    Awesome!

    Thanks for the information Leo … works like a charm!

    relsig Friend
    #564055

    Hello

    I’m facing the same problem. I first tried: http://www.t3-framework.org/documentation/bs3-customization#back-to-top with no luck, then I found this thread. It seems to be rather old. I tried to use it but no success.

    I’m Using JA_Brisk 1.1.1 and did the following.

    (function($){

    //Check div system-message-container exist

    $(document).ready(function(){

    if($("#system-message").children().length){

    $("#system-message-container").show();

    $("#system-message a.close").click(function(){

    setTimeout(function(){if(!$("#system-message").children().length) $("#system-message-container").hide();}, 100);

    });

    }else{

    $("#system-message-container").hide();

    }

    });
    })(jQuery);

    // back to top
    (function(){
    $ja('#back-to-top').on('click', function(){
    $ja('html, body').stop(true).animate({
    scrollTop: 0
    }, {
    duration: 800,
    easing: 'easeInOutCubic',
    complete: window.reflow
    });

    return false;
    });
    })();

    I’m not the coder, so I’m not sure if I put it to the correct position.

    Can you please advice?

    Thanks

    Roger

    Saguaros Moderator
    #564212

    Hi Roger,

    You can try with my tweak here:
    – Remove above code and use guideline in this tip: http://www.t3-framework.org/documentation/bs3-customization#back-to-top
    – But change a bit:

    Replace:
    <button class=”btn btn-primary” title=”Back to Top”><i class=”fa fa-angle-up”></i></button>
    With: <button class=”btn btn-primary” title=”Back to Top”><i class=”icon-chevron-up”></i></button>

    In the style.less file, remove this property: .opacity(0.7); http://prntscr.com/6k96yp

    Then open file: /templates/ja_brisk/css/custom.css, add this rule:


    .back-to-top i {
    color: #000;
    font-size: 12px;
    line-height: 1em;
    left: 50%;
    margin-top: -11px;
    margin-left: -4px;
    position: absolute;
    top: 50%;
    }

    #back-to-top .btn { color: #000 !important;}

    #back-to-top {
    bottom: 15px;
    display: block;
    }

    Finally, go to template manager section in backend > compile Less to Css. Remember to backup all current css files first as when compiling less to css, they will be overridden.

    relsig Friend
    #564989

    found the problem. Works like a charm.

    Thank you

    Roger

    relsig Friend
    #565374

    I played a little bit around with the css style. I wanted to have the button on the right hand side.
    Therefore I added the following to the custom.css. Is that correct?

    .back-to-top i {
    color: #fff
    }

    #back-to-top .btn {
    color: #000 !important;
    height: 40px;
    margin-right:15px;
    }

    #back-to-top {
    bottom: 15px;
    display: block;
    right:0;
    }

    Saguaros Moderator
    #565401

    Does this work?

    relsig Friend
    #565525

    yes, but 🙂

    See this picture, here you can see it working. It also works on iphone and ipad. Why do you mean that? Did I do something funny?

    Now here is the “but”. If the pages are rather short, then it looks strange

    . There is still something wrong.


    1. back-to-top
    2. back-to-top-search
    Saguaros Moderator
    #565600

    You can post URL of page where the page is short, I will take a look

    relsig Friend
    #566208
    Saguaros Moderator
    #566249

    In the ‘custom.css’ file, you can change:


    #back-to-top {
    bottom: 15px;
    display: block;
    right:0;
    }

    To:


    #back-to-top {
    bottom: 15px;
    display: block;
    position: fixed;
    }

    relsig Friend
    #569017

    Hi Saguaros

    Changed the code. Now the arrow is always on the left hand side and not on the right side anymore, where I would like it to be.

    Roger

    relsig Friend
    #734108

    Hi Saguaros

    Changed the code. Now the arrow is always on the left hand side and not on the right side anymore, where I would like it to be.

    Roger

    Saguaros Moderator
    #569166

    Hi Roger,

    You can add the property ‘right: 0;’ into above rule:


    #back-to-top {
    bottom: 15px;
    display: block;
    position: fixed;
    right: 0;
    }

Viewing 15 posts - 1 through 15 (of 16 total)

This topic contains 16 replies, has 4 voices, and was last updated by  Saguaros 9 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum