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

    Hi,

    How can I add > onclick=”ppsShowPopup(100); return false;” < to the Button Element?

    Thanks!

    #417503

    Hi!

    Not possible without deeply editing the theme files, i’d suggest the following:
    1. Enable this.
    2. Set a custom class to that button (ex: custom_click): http://screencast.com/t/1kkB01lkLPs
    3. Add this to your theme / child theme functions.php:

    function trigger_func_on_custom_button(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	$('.custom_click').on(function(e){
                  e.preventDefault();
                  ppsShowPopup(100);
            });
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'trigger_func_on_custom_button');

    Regards,
    Josue

    #1189408

    Alright.. what I did was I copied the button html and put it in the codeblock element with the onclick code in it.. seems a lot easier..

    This would be a nice function to have tho

    #1189588

    Hi joax,

    Thanks for sharing your solution :-)

    Best regards,
    Rikard

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