I need help with making a spinner gif hidden in Unbounce and then show when the user clicks a button. The button is labeled #lp-pom-button-279
and the image is labeled #lp-pom-image-288
My attempts to use JS and CSS have resulted in the gif being either always hidden or always shown – it doesn't appear on click like I want it to.
<script>
$('#lp-pom-button-279').click(function() {
$('#lp-pom-image-288').show(); //<----here
$.ajax({
....
success: function(result) {
$('#spinner').hide(); //<--- hide again
}
}
</script>
<style>
#lp-pom-image-288 {
display: none;
}
</style>