I have the following Javascript for continuous lighting / ripple of a text link. This link shows another section of the same page, so I would like it to stop as soon as the user clicked on it.
<script type="text/javascript">
$(document).ready(function() {
function pulsate() {
$(".pulsate").animate({opacity: 0.2}, 1200, 'linear')
.animate({opacity: 1}, 1200, 'linear', pulsate);
}
pulsate();
});
</script>
So basically, I just need to know what I need to add here so that the effect stops after clicking it.
If the same link is clicked again, the displayed section of the page will be hidden - are there too many problems for the effect to start again after the second click?
I look forward to hearing from you good people.
Scott.
source
share