Tagged: x
-
AuthorPosts
-
May 16, 2016 at 11:06 am #993838
hanicoffeeParticipantHi there,
Do you have any recommendations for plugins that allow me to add a “sticky” button or any content to the side of the website as like a sort of CTA? Or does X-THEME have any of these functionalities already?It can be like a narrow and long column on the side and needs to look good with the rest of the site. I don’t want it to be the sidebar but actually a floating column attached to the side.
If you can’t recommend good plugins could you please tell me the code that will be most compatible with the theme that will help achieve this feature?
I will attach a link to my site if it helps.
Thanks!!
May 16, 2016 at 11:06 am #993839
hanicoffeeParticipantThis reply has been marked as private.May 16, 2016 at 11:42 am #993898
RahulModeratorHi there,
We can not recommend a plugin which we haven’t tested extensively to work with X theme.
However, if you want to make your sidebar sticky, you can use by adding the following custom code :
You would need both CSS and JavaScript.
You can add this under Custom > CSS in the Customizer.
@media screen and (min-width:979px){ .fixedsidebar { position: fixed; top: 2.5%; right: 17.89%; width: 18%; } }add this under Custom > JavaScript also in the Customizer just below the Custom CSS.
jQuery( function($){ $(window).on('scroll', function(){ var sidebar = $('aside.x-sidebar.right'); if ( $( this ).scrollTop() >= $(sidebar).offset().top - 20 ) { console.log('fixed attached'); $( sidebar ).addClass('fixedsidebar'); } else { $( sidebar ).removeClass('fixedsidebar'); } console.log('scrolled'); }); $(window).trigger('scroll'); });Hope this helps!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-993838 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
