There is the following code:
.btn { position: absolute; background-color: red; border-radius: 3px; text-decoration: none; animation: border-pulsate 2s infinite; border: 2px solid black; transition: .5s; } @keyframes border-pulsate { 0% { border-color: rgba(0, 0, 0, 1); } 50% { border-color: rgba(0, 0, 0, 0); } 100% { border-color: rgba(0, 0, 0, 1); } } <a class="btn" href="#open-modal"><img src="https://image.flaticon.com/icons/svg/36/36601.svg"></a> The link simply opens a modal window. How do I use javascript (or, if there is a way, CSS) when I click on the button to remove the border'a animation?
$('.btn').click(function(){$('.btn').css({"animation-name":"none"})});Well, oranimation-namereplaced byborder- user242433