How can I only trigger toggle once?
I have...
<%= f.check_box :push %>
<label for="challenge_push" class="reminder-choices">Push</label>
<%= f.check_box :message %>
<label for="challenge_message" class="reminder-choices">Text</label>
<%= f.check_box :mail %>
<label for="challenge_mail" class="reminder-choices">Email</label>
<script>
$('.reminder-choices').click(function(){
$(".hide-remind").toggle();
});
</script>
I tried...
# Same behavior as above. Still toggles back and forth.
$('.reminder-choices').one("click", function(){
$(".hide-remind").toggle();
});
In other words, once .reminder-choices
is clicked once then toggle will work otherwise if it is clicked again then it will not work.