Support » Plugin: Collapse-O-Matic » Text Expands Beyond Content Area

  • Hi! I’ve seen solutions to this problem, but I can’t figure out how to apply them to my theme. I’m using the theme Aesthetic from themeforest. I’ve named the headline “The problem” under the image in the link. Any help with this would be highly appreciated.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author twinpictures

    (@twinpictures)

    Ok, so the issue is that your content area has a fixed height that is calculated on page load based on the amount of content. Once the hidden content is expanded, the content goes ‘beyond’ the fixed height, and is clipped.

    You can see that this auto-fixes once the windows is resized.

    So what is needed is a javascript callback each time an expand element is expanded or collapsed. You might want to contact your theme developer regarding two issues:
    1. is there a function that can be triggered to recalculate the element sizes
    2. what is the best way integrate javascript into your child theme

    Regardless, if you add the following to your functions.php file it should work:

    add_action('wp_footer', 'custom_footer_script');
    function custom_footer_script(){
    ?>
        <script type='text/javascript'>
        function colomat_callback(){
            window.dispatchEvent(new Event('resize'));
        }
        </script>
    <?php
    }
    

    And please, do us know if that works for you!

    Thanks for response! Iv’e added the code. It resized the window, but only after collapsing the expanded text, then it resizes back when expanding. The theme does have a function to expand and collapse the table depending on content, if I understand you correctly. I’ve added a carousel on another text under “problem text” for demonstration, if it helps?

    Plugin Author twinpictures

    (@twinpictures)

    Ok that carousel is being resized from the .js file:

    http://schiefauer.se/wp-content/themes/aesthetic-parent/js/jquery.carouFredSel-6.2.1-packed.js?ver=1.0.10

    You need to reach out to your theme developers and ask how best trigger an element resize.

    You can also try the modifying the code above as follows:
    Change:
    window.dispatchEvent(new Event('resize'));
    To:
    jQuery(window).trigger('resize');

    Let us know how it goes and we’ll take another crack at it.

    Thanks! The change in code gives the same result as before.
    I’ve reached out to developers, but they’re off until tomorrow.

    Plugin Author twinpictures

    (@twinpictures)

    When you do contact them, refer them to this thread.
    Basically we just need to know the callback to use to trigger the resizing of an element. Let us know if you hear anything or if we can be of any further assistance.

    itLwork

    (@confussed)

    I’m still waiting for reply from them. But i found this, does it help?
    https://github.com/ThemeFuse/Unyson/issues/1902

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