Tagged: x
-
AuthorPosts
-
November 7, 2016 at 1:05 pm #1247523
acritchParticipantHello,
A few months ago I had asked about a fixed sidebar using the Integrity stack and someone gave me a piece of code that worked great at the time:
.x-sidebar.right { position: fixed; right: 100px; }That was until I added a slider to the page. Once I did that the side menu moved way down the page so it was not usable (see screen shot). I have since removed that piece of code and the menu has moved back up directly under the slider. My question now is, how do I get it to stick there so it doesn’t scroll when the page does?
I am using X v4.6.4, Cornerstone V1.3.3, and WP 4.6.1. Credentials and problem page in the next post.
Additional question – I had used this method because I wanted a secondary form of navigation to navigate around the long page. Would Uber Menu be able to provide something similar that is easier to create and maintain? I know it has a TON of capabilities but it has been too intimidating for me to look into yet.
November 7, 2016 at 1:06 pm #1247525
acritchParticipantThis reply has been marked as private.November 7, 2016 at 9:01 pm #1248070
Nabeel AModeratorHi there,
Thanks for writing in! Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ var slider = $('.x-slider-container.below').height() + 40; $(window).scroll(function(){ if ($(this).scrollTop() > slider) { $('aside.x-sidebar.right > div').css({"position": "fixed", "top": "130px", "right": "50px", "width": "25%"}); } else { $('aside.x-sidebar.right > div').css({"position": "relative", "top": "auto", "right": "auto", "width": "auto"}); } }); });Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
November 8, 2016 at 5:10 am #1248498
acritchParticipantThat works great!! Thank you!
November 8, 2016 at 5:14 am #1248502
JadeModeratorYou’re most welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1247523 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
