-
AuthorPosts
-
jscarfe Friend
jscarfe
- Join date:
- December 2012
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
May 12, 2013 at 7:44 pm #187436I’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 Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
May 14, 2013 at 8:31 am #492684Hi,
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 user says Thank You to phong nam for this useful post
jscarfe Friendjscarfe
- Join date:
- December 2012
- Posts:
- 22
- Downloads:
- 0
- Uploads:
- 2
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
May 19, 2013 at 10:33 pm #493266Awesome!
Thanks for the information Leo … works like a charm!
1 user says Thank You to jscarfe for this useful post
relsig Friendrelsig
- Join date:
- October 2007
- Posts:
- 218
- Downloads:
- 22
- Uploads:
- 61
- Thanks:
- 16
- Thanked:
- 10 times in 3 posts
March 21, 2015 at 8:34 pm #564055Hello
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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 23, 2015 at 8:40 am #564212Hi 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 Friendrelsig
- Join date:
- October 2007
- Posts:
- 218
- Downloads:
- 22
- Uploads:
- 61
- Thanks:
- 16
- Thanked:
- 10 times in 3 posts
March 29, 2015 at 4:41 pm #564989found the problem. Works like a charm.
Thank you
Roger
relsig Friendrelsig
- Join date:
- October 2007
- Posts:
- 218
- Downloads:
- 22
- Uploads:
- 61
- Thanks:
- 16
- Thanked:
- 10 times in 3 posts
April 1, 2015 at 3:43 pm #565374I 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 2, 2015 at 1:38 am #565401Does this work?
relsig Friendrelsig
- Join date:
- October 2007
- Posts:
- 218
- Downloads:
- 22
- Uploads:
- 61
- Thanks:
- 16
- Thanked:
- 10 times in 3 posts
April 2, 2015 at 3:36 pm #565525yes, 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.
-
Saguaros Moderator
Saguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 3, 2015 at 7:04 am #565600You can post URL of page where the page is short, I will take a look
relsig Friendrelsig
- Join date:
- October 2007
- Posts:
- 218
- Downloads:
- 22
- Uploads:
- 61
- Thanks:
- 16
- Thanked:
- 10 times in 3 posts
April 7, 2015 at 9:14 pm #566208Here a short page: http://www.samariter-osv.ch/intern/kl-tl/downloads
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 8, 2015 at 1:32 am #566249In 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 Friendrelsig
- Join date:
- October 2007
- Posts:
- 218
- Downloads:
- 22
- Uploads:
- 61
- Thanks:
- 16
- Thanked:
- 10 times in 3 posts
April 30, 2015 at 6:24 pm #569017Hi 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 Friendrelsig
- Join date:
- October 2007
- Posts:
- 218
- Downloads:
- 22
- Uploads:
- 61
- Thanks:
- 16
- Thanked:
- 10 times in 3 posts
April 30, 2015 at 6:24 pm #734108Hi 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 ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
May 2, 2015 at 2:55 am #569166Hi Roger,
You can add the property ‘right: 0;’ into above rule:
#back-to-top {
bottom: 15px;
display: block;
position: fixed;
right: 0;
}
-
AuthorPosts
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
Jump to forum