Replace href on browser window resize in JavaScript

<script>
    jQuery(document).ready(function(e) {
    if (jQuery(window).width() < 768)
    {
    jQuery(".wrapper a").attr('href','tel:1-123-456-7890')
    }
    });
</script>