Tagged: sticky sidebar
-
AuthorPosts
-
January 20, 2015 at 3:59 pm #382516
Hi, I want to make a sidebar widget sticky so once the user scrolls down it will stick to the top (just below the menu). I’m using a plugin for this called Q2W3 Fixed Widget (Sticky Widget) but it doesn’t seem to work with Enfold.
You can see what happens in the URL.
January 22, 2015 at 3:04 am #383469Hey DROR!
did you try to deactivate all other plugins? Maybe you can contact the author of the plugin for support:
https://wordpress.org/support/plugin/q2w3-fixed-widget
or maybe another plugin would do the job with Enfold.Best regards,
Andy- This reply was modified 9 years, 11 months ago by Andy.
July 23, 2015 at 4:57 pm #477827As a test I quickly ‘fixed’ a sticky sidebar by dropping this code in the Google-analytics box in the theme settings :)
Ofcourse you _should_ play nice and put this script somewhere in a file where this javascript belongs… and correctly use jQuery instead of linking to it again…<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script> <script> $(function() { // grab the initial top offset of the navigation var sticky_navigation_offset_top = $('aside.sidebar_left').offset().top; // our function that decides weather the navigation bar should have "fixed" css position or not. var sticky_navigation = function(){ var scroll_top = $(window).scrollTop(); // our current vertical position from the top // if we've scrolled more than the navigation, change its position to fixed to stick to top, // otherwise change it back to relative if (scroll_top > sticky_navigation_offset_top) { // change the 60 to the height that _YOU_ need... $('aside.sidebar_left').css({ 'position': 'fixed', 'top':60}); } else { $('aside.sidebar_left').css({ 'position': 'relative' }); } }; // run our function on load sticky_navigation(); // and run it again every time you scroll $(window).scroll(function() { sticky_navigation(); }); }); </script>
Want to know more? I found the demo here:
http://www.backslash.gr/content/blog/webdevelopment/6-navigation-menu-that-stays-on-top-with-jqueryJuly 23, 2015 at 5:02 pm #477834July 24, 2015 at 11:42 am #478140isn’t it possible to create on enfold a custom widget area and than try to position it with css (z-index and fixed) in this manner?
July 24, 2015 at 3:22 pm #478203Hey!
@guenni007 It is but the one @pixelbits posted above is more advanced since it is using jQuery to detect scroll position and then applying custom CSSCheers!
YigitNovember 17, 2015 at 4:12 pm #537367Hi Guys,
I’m having a similar problem. The widget is disappearing after the sidebar ends (so after 50px of padding).
http://b-dev.nl/nm/this-is-a-nice-post/ login:arjen/welkom12345
I can’t find out what element the sidebar is disappearing behind, also even setting a z-index of 10000 to .widget or .sidebar doesn’t solve my problems.
I’ve tried every solution there is to find, (on this forum and wordpress.com forum) but nothing seems to work.
@Pixelbits i’ve also tried adding your code but i think newer theme/plug-in versions prevent this from working as well.Anyone who has found a solution?
Kind regards!
November 19, 2015 at 2:24 pm #538996@lucasvrooij
I can’t see any disappearing widget on the link you have provided. Please provide us a precise link, where we can see the issue, because we need to be able to inspect the elements. Add screenshots to make things clear for us. You can use imgur.com or dropbox.Best regards,
AndyNovember 20, 2015 at 5:30 pm #539792Hi Andy,
It’s the social buttons on the right side that disapprear while scrolling.
Screenshot:
Kind regards!
November 24, 2015 at 3:11 pm #541681Hey!
thanks for the screenshot. You need to increase sidebar’s height. Use this code for example:
aside.sidebar.sidebar_right.alpha.units { height: 1800px; }
and adjust as needed.
Regards,
AndyNovember 24, 2015 at 7:18 pm #541885Hi Andy,
Actually i had already tried this, but it’s not a nice solution since it creates a white gap before the footer on shorter pages.
While trying to find a solution i ran across quite a lot of forum posts (here and on other sides) regarding problems with the Q2W3 Fixed Widget in enfold, but no one has found the answer. I’d be nice if this was the last post about this issue because we found a definitive solution!
On the other hand, i get that this issue is involving a 3rd party extension, so you can’t spend too much timeon it.
I completely understand if you can’t assist me any further. (i really do)
Kind regards!
November 25, 2015 at 1:17 pm #542374Hi!
I am sorry, as you already say we can’t provide support for every third party plugin, so you would need to ask plugin’s author about this issue. As a workaround you could try to define different heights on different pages using page-id.
Cheers!
AndyNovember 26, 2015 at 12:16 pm #543037Hi Andy,
No problem, could you tell me how to use page-id in css?
Thanks!
November 26, 2015 at 2:56 pm #543162Hi!
sure, here you go for an example: https://kriesi.at/support/topic/changing-a-specific-page-with-quick-css/#post-223394
and here are more information about page-id in WordPress: https://en.support.wordpress.com/pages/#how-to-find-the-page-id
Regards,
AndyOctober 11, 2019 at 6:56 pm #1147210sorry – wrong topic – ( you shouldn’t have more than one open. )
-
AuthorPosts
- You must be logged in to reply to this topic.