Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1220361

    Is it possible to animate text on page so it pops up/fade in when you scroll? Similar to the way animation works with images.

    • This topic was modified 3 years, 11 months ago by navindesigns.
    #1220364

    on most cases it will be possible to insert those texts or headings in a column. These columns have on their options the opportunity to animate in the same way.
    Advanced Tab on Options : Animation

    #1220575

    Thanks. This works on desktop but not on mobile.

    #1222163

    have you seen your hamburger menu on ipad portrait ?
    Maybe it is just a mediaquery problem. ( 768px til 1118px ) the menu must be styled.
    It is hard to find out on a merged css with developer tools.
    i guess that problem is more urgent than the popup on scroll.

    With this scroll problem I will build a page, and see if it does not work.

    • This reply was modified 3 years, 11 months ago by Guenni007.
    #1222168

    Ok thanks. please let me know your findings

    #1222478

    Hi,
    Sorry for the late reply and thanks for the link, looking at your 3 text blocks at the top of your page on mobile I see that that they are in a section that only shows on mobile #buildingtopmobile but each block has a different custom class, so for example, your second block has the custom class .textMiddle and this script hides the text block on page load and then shows it with animation when the element is about mid-screen.
    Try adding this code to the end of your functions.php file in Appearance > Editor:

    function custom_script(){
      ?>
      <script>
    (function($) {
    var headerHeight = -200;
    var distance = $('#buildingtopmobile .textMiddle').offset().top + headerHeight;
    $('#buildingtopmobile .textMiddle').hide();
    $(window).scroll(function() {
        if ( $(this).scrollTop() >= distance ) {
        	$('#buildingtopmobile .textMiddle').show("slow"); 
           
       } else {
          
       }
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'custom_script');

    Please clear your browser cache and check that this works for you on mobile and if so then try making the last text block have the same custom class to see if both animate on scroll. I don’t think the top text block should have the class because it is already in view on page load so you probably won’t notice the animation.

    Best regards,
    Mike

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