-
AuthorPosts
-
vric Friend
vric
- Join date:
- April 2008
- Posts:
- 22
- Downloads:
- 7
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
March 26, 2013 at 1:38 pm #186222Hi
I’m trying to customize the Argo navigation so it could give me space for a header (aka bigger logo)
I try to modify the menu so it isn’t on absolute top, but a bit below. This is easy but the part I can’t get it to work is to “stick” at the top as soon as I passed it.
You can see an exemple of this on polygon.com
So far I have tried this js script with no avail. Guess there’s too much css conflict.
http://updates.html5rocks.com/2012/08/Stick-your-landings-position-sticky-lands-in-WebKitif anyone has an idea, lmk!
Thanks
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
March 27, 2013 at 7:55 am #487964Dear Vric,
Please open file templates/ja_argo/js/script.js and find sidebar = $(‘.sidebar-affix’) . It is a example, you could add menu block as sidebar block in this file.
Regards
vric Friendvric
- Join date:
- April 2008
- Posts:
- 22
- Downloads:
- 7
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
April 9, 2013 at 3:50 pm #489351Hi
Thanks for the reply. I tried my best to understand and with trial and error, I mostly got error.
Would you be able to give a little more details please?
Thanks
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
April 10, 2013 at 8:33 am #489413Hi vric,
Just open file /templates/ja_argo/js/script.js and add this line code at the bottom:
jQuery(‘#t3-mainnav’).affix({offset: {top: 50}})
Make sure you place this line inside a $(document).ready(function(){ .. }); function call.
Please change the 50 here to the distance from top to your navigation bar.
You also need to remove position fixed .navbar-fixed-top from the div#t3-mainnav (this can be done via templatesja_argotplsblocksheader.php)Hope it helps.
Regards
vric Friendvric
- Join date:
- April 2008
- Posts:
- 22
- Downloads:
- 7
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
April 11, 2013 at 10:55 pm #489597Thanks for the reply. The function seem to work great!
The only thing, and I hate to ask, is the CSS applied to the nave change from t3-mainnav “navbar-collapse-fixed-top affix-top” to “wrap t3-mainnav navbar-collapse-fixed-top affix“
I can’t find anything about these two. So when I scroll down at the triggered height, the navbar switch to left instead of center, doesn’t take the whole page and the t3-mainbody switch from 1196px to about 800 (guessing here, Can’t see the css of that)
Not sure if I’m clear.
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
April 12, 2013 at 1:50 am #489605Hi vric,
You should add css for those class change.
.navbar-collapse-fixed-top.affix-top {
position: static;
z-index: 2000;
}.navbar-collapse-fixed-top.affix {
position: fixed;
top: 0; (you can change it if you want);
left: 0;
right: 0;
}Hope it helps.
Regards
vric Friendvric
- Join date:
- April 2008
- Posts:
- 22
- Downloads:
- 7
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
April 12, 2013 at 9:27 pm #489711it actually work thanks!
Only thing now is: the sidebar that was fixed isnt anymore and once I’m at the bottom of the page, there’s no autolog
This is with any other theme beside “default”. Default still “squeze” itselft for no reason. Guess it’s a bug from the template
vric Friendvric
- Join date:
- April 2008
- Posts:
- 22
- Downloads:
- 7
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
April 12, 2013 at 11:25 pm #489712Edit:
Nevermind.
the jQuery(‘#t3-mainnav’).affix({offset: {top: 100}}) line MUST be at the very bottom of the script.js file to work.
Everything works as it should. Thanks a lot guys!
vric Friendvric
- Join date:
- April 2008
- Posts:
- 22
- Downloads:
- 7
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
April 30, 2013 at 6:55 pm #491476Ok I have to reopen this.
The menu was working fine until I put it only on my dev server (was working in wamp) Now I have a “trigger” problem when the menu isn’t fixed. (when page isn’t scrolled
I first had this problem on my dev computer, and I found out that the class .open in template had an * in front of the z-index. Removing the * solved the problem. But on my live dev site, doing so doesn’t works. I tried my best to see if there was a conflict with z-indexes, but can’t find any.
The problem is more important on Google Chrome and IE where the menu is unusable. Firefox works ok with it (you can see the cursor change a lot, but megadim class is trigered and menu show)
Any help would be appreciated. Thanks
vric Friendvric
- Join date:
- April 2008
- Posts:
- 22
- Downloads:
- 7
- Uploads:
- 0
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
April 30, 2013 at 9:33 pm #491483Found it (after many hours :p)
.navbar-collapse-fixed-top.affix-top {
position: static;
z-index: 2000;
}Should be position: relative; not static
Solved problem under Firefox IE and ChromeMods, can you edit my msg and remove url. Thanks
1 user says Thank You to vric for this useful post
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
May 1, 2013 at 1:36 am #491496Great, good jobs
<blockquote>Mods, can you edit my msg and remove url.</blockquote>
I have removed your request
-
AuthorPosts
This topic contains 11 replies, has 4 voices, and was last updated by Ninja Lead 11 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum