-
AuthorPosts
-
tyfairclough Friend
tyfairclough
- Join date:
- December 2012
- Posts:
- 51
- Downloads:
- 120
- Uploads:
- 6
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
November 22, 2014 at 4:02 pm #202964It would appear that the affix-top is not being added to my template when the page loads. It means that my content below is partially obscured beneath the menu bar.
I’m running the latest joomla 3.3.6 , the latest versions of t3 2.4.1 and uber 2.0.1
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 24, 2014 at 7:40 am #556287Hi,
I checked your site but didn’t see any problem with this part. By default, the header will be set with class name “affix-top” and whenever you scroll down, the class name will be changed to “affix” which make it sticky. If you can check any content page, you will see it works fine.
tyfairclough Friendtyfairclough
- Join date:
- December 2012
- Posts:
- 51
- Downloads:
- 120
- Uploads:
- 6
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
November 26, 2014 at 11:24 pm #556714Could you double check that because as I understand it the affix plugin adds affix-top or affix-bottom and when you scroll past the offset it removes the class.
I’ve manually fired the method
<script>
jQuery(function($) {
$(‘#t3-header’).affix({
offset: {
top: 100,
bottom: function () {
return (this.bottom = $(‘.footer’).outerHeight(true))
}
}
});
});
</script>via the custom code block and it now works as expected.
tyfairclough Friendtyfairclough
- Join date:
- December 2012
- Posts:
- 51
- Downloads:
- 120
- Uploads:
- 6
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
November 27, 2014 at 12:21 am #556717Here is my point of reference:
http://getbootstrap.com/javascript/#affixI also watched the console for any changes in the html and noted that the “#back-to-top” arrow was getting affix-top attached to it. Maybe the affix plugin is being targeted at the wrong element?
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 27, 2014 at 3:01 am #556725Hi @tyfairclough,
If you take a look at our demo site here you will see the Main Menu is sticky. Unless you modify the code here, otherwise it should works fine.
tyfairclough Friendtyfairclough
- Join date:
- December 2012
- Posts:
- 51
- Downloads:
- 120
- Uploads:
- 6
- Thanks:
- 2
- Thanked:
- 4 times in 1 posts
November 28, 2014 at 1:44 am #556875Yea so the demo is behaving as expected .affix-top is being assigned to the nav when it is at the top of the page. My installation (i’ve tried re-uploading the template) only has .affix , .affix-top never comes into it unless I had the javascript manually in the custom code block of the template back-end.
I have made my site available to pre-view and commented out my affix from the custom code block. You’ll see if you inspect the dom that the affix-top is not being assigned to the navigation.
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 28, 2014 at 9:11 am #556914Hi,
If you take a quick look at element ID and class name of header part, you will see that they’re different from our demo site. Please login via FTP, temporary rename your current template folder and upload original template package from here then recheck.
In addition, if you want to add extra CSS code, please use custom.css file instead. The option Custom Code should be used to insert JS only.
-
AuthorPosts
This topic contains 7 replies, has 2 voices, and was last updated by Adam M 10 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum