Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1061605
    kprzita
    Participant

    Hi guys!

    http://www.thefoothub.com.au

    I have a green banner which shows book now..I’m currently using a plugin to make it sticky on the page but it really isn’t working.

    I would like to know how I can make that green banner which is just a row in VC to be fixed when I scroll down the page past it and it stays fixed under the main banner.

    Check out the site and you will see the plugin in action but it isn’t ideal..would like to know the css equivalents!

    #1061689
    Rupok
    Member

    Hi there,

    Thanks for writing in! We don’t provide support for third party plugin so can’t help to diagnose why it’s not working. But I ca provide you a workaround that you can try.

    You can add this under Custom > JavaScript in the Customizer.

    $(window).scroll(function(){
    	if ($(this).scrollTop() > 800) {
    		$('.sticky').addClass('sticky-on-top');
    	} else {
    		$('.sticky').removeClass('sticky-on-top');
    	}
    });

    You can add this under Custom > CSS in the Customizer.

    .sticky.sticky-on-top {
      left: 0;
      position: fixed;
      right: 0;
      top: 80px;
    }

    Hope this helps.

    Cheers!

    #1064671
    kprzita
    Participant

    Awesome I’ll give it go – it wasn’t more so third party plugin support but can I replicate this with just code 🙂

    #1064750
    Prasant Rai
    Moderator

    Let us know how it goes.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1061605 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>