Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1462498

    Hi

    I have set up a test section togglle using a button, using instructions from https://kriesi.at/documentation/enfold/button/#toggle-id-7, however I cant get it to work. Can you advise where I have gone wrong please

    test page below

    Kind ergards

    Duncan

    #1462563

    Hey dweddell,
    Thank you for the link to your site, but I didn’t find the jQuery code on your page or the console.log messages, are you sure that you added it to your functions.php file?

    function toggle_on_click() {
    ?>
    <script>
    jQuery(window).on('load', function(){
    
    jQuery(".toggle-button a").on("click", function(e) {
    	console.log(" toggle section");
    
    	jQuery("#toggle-section").toggleClass("hide-me");
    
    	console.log(" Prevent default ");
    
    	e.preventDefault();
    
    });
    });
    </script>
    <?php 
    }
    add_action('wp_footer', 'toggle_on_click');

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
    If you did, please include an admin login in the Private Content area so we can be of more assistance.

    Best regards,
    Mike

    #1462599

    Many thanks mike

    id put script in the styles.css file ….dope

    #1462605

    Hi,
    Glad to hear that you have this sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Section toggle’ is closed to new replies.