-
AuthorPosts
-
October 8, 2015 at 7:29 am #731375
Dear All,
Can i keep the menu in JA Charity template on top when scrolling?
Thanks!
Pankaj Sharma ModeratorPankaj Sharma
- Join date:
- February 2015
- Posts:
- 24589
- Downloads:
- 144
- Uploads:
- 202
- Thanks:
- 127
- Thanked:
- 4196 times in 4019 posts
October 8, 2015 at 10:53 am #751004Hi
Kindly share your working site url here.October 8, 2015 at 11:04 am #751005Thank you for your reply, But I’m sorry, i am working now on localhost.
October 8, 2015 at 1:24 pm #751016Anybody can send the tutorial or documentation about this?
TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
October 8, 2015 at 3:22 pm #751022Try This . . .
If you haven’t yet done so, create a new file called “custom.css” within file path –> /templates/ja_charity/css/
Within that custom.css file, paste the following CSS rules:
.t3-header {
background: #ffd733 none repeat scroll 0 0;
color: #ffffff;
padding-bottom: 14px;
padding-top: 50px;
position: fixed;
width: 100%;
z-index: 99;
}.t3-topbar {
background-color: #333333;
color: #ffffff;
height: 36px;
line-height: 36px;
position: fixed;
width: 100%;
z-index: 100;
}SAVE CHANGES – CLEAR CACHE- REFRESH PAGE
Better ??
October 9, 2015 at 7:15 am #751090Thank you for your help.
I fixed it with this code:
I added he js code at the first,
jQuery(window).on("load", function() {
if(jQuery("#t3-header")){
offset_top = jQuery(" #t3-header").offset().top
jQuery(window).scroll(function(){
processScroll("#t3-header", "top-fixed", offset_top);
});
}
});function processScroll(element, eclass, offset_top, column, offset_end) {
var scrollTop = jQuery(window).scrollTop();
if(jQuery(element).height()< jQuery(window).height()){
if (scrollTop >= offset_top) {
jQuery(element).addClass(eclass);
} else if (scrollTop <= offset_top) {
jQuery(element).removeClass(eclass);
}}
}Then i added this code in css:
.top-fixed {
width: 100%;
margin: 0;
position: fixed;
top: 0;
left: 0;
transition: all 1s;
background-color: #2d2f31!important
}TomC ModeratorTomC
- Join date:
- October 2014
- Posts:
- 14077
- Downloads:
- 58
- Uploads:
- 137
- Thanks:
- 948
- Thanked:
- 3155 times in 2495 posts
October 9, 2015 at 2:58 pm #751151As you can see, there are often multiple ways/methods of arriving at any given solution. 🙂
All the best with your continuing site development.
-
AuthorPosts
This topic contains 8 replies, has 3 voices, and was last updated by meziane 9 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum