Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #386885

    On our website we’d like our floating button to appear after users scroll down a bit. We’d like it to behave exactly as the “back to top” button behaves on the bottom right corner in Enfold.

    How can we do that?

    #387491

    Hey lapajnea!

    That’s not as easy as it sounds. Try adding this to the bottom of your functions.php file.

    add_action( 'ava_main_header', 'enfold_customization_add_button' );
    function enfold_customization_add_button() {
         echo do_shortcode("[your button shortcode goes here]");
    }

    And then add this to your custom CSS.

    #header .avia-button { display: none; }
    .header-scrolled .avia-button { display: block !important; }
    

    Or another way would be to open up /enfold/js/avia.js and on line 1455 you should see this.

    av_change_class(header, 'remove', 'header-scrolled');
    

    Add this beneath it.

    jQuery('.your_button_class').show();
    

    And then add a custom class to your button called “your_button_class”.

    Regards,
    Elliott

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.