Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #702078

    Hi, How can i create a “load more” button that after clicking it, it shows design element(box with content) like a color section?

    #702096

    Hey Davipar,

    Please enable the custom css class field: http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and edit your button element (which will be used as toggle button for your section) and give it “accsb” custom class.

    Then edit your Color Section element and give it a unique ID “accs”.

    Then add following code to Quick CSS in Enfold theme options under General Styling tab

    #accs { display: none; }

    And finally, add following code to Functions.php file in Appearance > Editor

    function avia_custom_accs(){
    ?>
     <script>
    jQuery(window).load(function(){
            jQuery('.accsb a').click(function() {
                    jQuery('#accs').slideToggle("fast");
            });
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'avia_custom_accs');

    Best regards,
    Yigit

    #702125

    I’ve got two options:

    funciona.php and functions_enfold.php
    If i put this code: `function avia_custom_accs(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘.accsb a’).click(function() {
    jQuery(‘#accs’).slideToggle(“fast”);
    });
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘avia_custom_accs’);`

    on functions_enfold.php my website turns white and does not work but if i put it on just functions.php it does not work too

    #702260

    Hi,

    Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Regards,
    Rikard

    #702278

    Okey Just wordpress?

    #702426

    Hi,

    Login page is not loading on my end. Please make sure to add the code to functions.php file.
    If that too does not help, please post FTP logins here privately as well.

    Best regards,
    Yigit

    #702459

    Where are you from? My hosting server block non spanish countries.
    I will give you access after it.
    Thank you!

    #702752

    Hi,

    Moderators are located all over the world so if you could lift that ban for a few days until we resolve your problem it would be great.

    Thanks,
    Rikard

    #1109851

    hey there,

    i´ve created it like you said here…

    the content is just visible for a moment. what did i do wrong?

    thx
    tom

    #1110817

    Hi hoibi1984,

    Not sure what code you added, the page just reloads.

    Could you please attach a mockup of what you’re trying to achieve?

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1110955

    Hi Victoria,

    of course you can have access.

    I´ve tried display a color section just by clicking a button like it is explained ahead.

    I´ve done all the things yigit wrote on top of this topic.

    this is the url of the example: http://petra.ammersee-media.de/portfolio/

    thx for your help!

    #1111648

    yes, the page does just reload, because the button has no target. where has the button to point at?

    #1112514

    Hi,
    Sorry for the late reply, I have taken a look at your page and found some errors in your functions.php code, I corrected it to reflect the code above. So I see that you have two “toggle” images and 3 buttons, I made the top two open & close toggle 1 and the bottom one open & close toggle 2
    I was able to have two different buttons on one page by using this functions.php:

     function avia_custom_accs(){
    ?>
     <script>
    jQuery(document).ready(function(){
            jQuery('.accsb a').click(function() {
                    jQuery('#accs').slideToggle('fast');
            });
    	 jQuery('.accsb1 a').click(function() {
                    jQuery('#accs1').slideToggle('fast');
            });
    });
     </script>
    <?php
    }
    add_action('wp_footer', 'avia_custom_accs');

    I did this as an example for your page, if you don’t need this functionalty, then just remove:

    jQuery('.accsb1 a').click(function() {
                    jQuery('#accs1').slideToggle('fast');
            });

    from the code.
    I also removed the css, as I don’t believe it’s necessary.
    Please clear your browser cache and check.

    Best regards,
    Mike

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