Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1122681

    Is there a way to make a button disappear on a page after it’s been clicked on?

    #1122730

    if you realy want to get rid of that button – you can use remove for it – place that in child-theme functions.php
    f.e. you placed an enfold button and give a custom class to it f.e.: button-customclass

    function remove_a_button_with_custom_class(){
    ?>
    <script>
    (function($){	
    	$(".button-customclass a").click(function(){
        	$(this).remove();
    	});
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'remove_a_button_with_custom_class');
    #1122737

    Hi,

    Thanks for helping out @guenni007, did you try that out @jonnyckk?

    Best regards,
    Rikard

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