BTN change?

<script>
function checkForChanges()
{
if ($('body').hasClass('cart-window-visible'))
$('.discount-coupon .btn').text('Uplatnit poukaz');
else
setTimeout(checkForChanges, 5);
}
</script>