Hi,
How can I add > onclick=”ppsShowPopup(100); return false;” < to the Button Element?
Thanks!
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
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