Hello,
I need to add an onclick event to a column link and I’m not sure how to go about it. I have added custom_link as a class to the column and placed this script in my functions.php file but cant seem to get it to work.. Any help would be appreciated.
function trigger_func_on_custom_button(){
?>
<script>
(function($){
$(window).load(function() {
$('.custom_click a').click(function(e){
e.preventDefault();
var con=confirm("This section of the website is under construction. Click here to continue to the archive site.");
});
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'trigger_func_on_custom_button');
Hi Mike,
Sorry for the late reply. Unfortunately, I’m still struggling with this. I dont have any errors in my console.
It seems as soon as I add content to the column the pop up fails.
Hi,
Please include an admin login in the Private Content area so we can take a look.
Best regards,
Mike
Here you go.