XF 2.3 Confirmation overlay

I had to do this today. I'm not sure if there is a built-in method, but you could check XF's core.js. I ended up adding a script to the bottom of my template.

Code:
<script>
jQuery(document).ready(function($) {
    var myLink = $('.class-for-your-link-or-button');
        myLink.on('click', function(event) {
         if (!confirm('Are you sure you want to foo? This action cannot be undone.')) {
                event.preventDefault();
         }
    });
});
</script>
 
Back
Top Bottom