Popup Pro - HTML button to close window

So i'm trying to use an html button to close the popup. This is the script that I had gotten off another similar thread. This script is in currently in the footer.php file.

<script type="text/javascript">
    jQuery(function($){
        $(document).on( '.memberagree', 'click', function(e){
            e.preventDefault();
            $('.wdpu-close').click();
            return false;
        });
    });
</script>

The button has the css class memberagree. Can anyone help? - http://futures.wpengine.com/