wordpress and add actions to button by coding

Try below method.

<a id="view_site_description" href="https://wordpress.stackexchange.com/questions/365101/javascript:void(0);">View Our Site Description</a>

add_action( 'wp_footer', 'add_js_to_wp_footer' );
function add_js_to_wp_footer(){ ?>
    <script type="text/javascript">
    jQuery('#view_site_description').click(function(){
        jQuery.ajax({
            type: 'POST',
            url: ajaxurl,
            data: {"action": "myfilter"},
            success: function(data){alert(data);}
        });
        return false;
    });
    </script>
<?php }