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

    Hello,

    We’re redesigning a website with Enfold, and our client asked us to do this (attached page).
    The idea is that when you click on the basement or floors button, the image changes, as does the bottom content. How can we do this?

    Thanks in advance.

    BR,

    Antonio

    #1487957

    Hey Antonio,

    Thank you for the inquiry.

    Try to add a 1/3 column element alongside a 2/3 column element. In the 1/3 column, insert three Button elements. Set each Button Link manually, and enter #1, #2, and #3 in the link fields respectively. In the 2/3 column, add an Easy Slider with three images and make sure the dots navigation is enabled. After that, add the following script in the functions.php file to trigger the dots navigation when a Button element is clicked.

    add_action( 'wp_footer', 'av_custom_script', 100 );
    function av_custom_script() {
        ?>
        <script>
        // trigger slider dots
        jQuery(document).ready(function($) {
            $('.avia-button').on('click', function(e) {
                var targetHref = $(this).attr('href');
                if (targetHref && targetHref.startsWith('#')) {
                    var slideDot = $('.goto-slide[href="' + targetHref + '"]');
                    if (slideDot.length) {
                        e.preventDefault();
                        slideDot.trigger('click');
                    }
                }
            });
        });
        </script>
        <?php
    }

    Let us know the result.

    Best regards,
    Ismael

    #1487986

    Hi Ismael,

    I have had the test but no works ; (
    Here I send you the web if like check it.
    Many thanks,

    BR,

    Antonio

    #1488001

    Hi,
    When I check the JavaScript doesn’t seem to be added to your page, when I inject it, it works like Ismael posted.
    Perhaps you did not copy the JavaScript from the forum and the characters were converted? Copying code snippets from email will break it.
    We can’t tell without and Admin login.

    Best regards,
    Mike

    #1488017

    Hi Mike,

    Sorry, you right. I have added the code incomplete.
    Works perfect.

    Many thanks!

    BR,

    Antonio.

    #1488038

    Hi,

    You’re welcome! Please feel free to open another thread if you have more questions.

    Have a nice day.

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Bottom change information in same page’ is closed to new replies.