0
This code of mine is a bit buggy, its function is to display the message and leave it there until it refreshes the page, but it is disappearing.
$('form#yes').on('click', function() {
    function isyes() {
        $.ajax({
            type: 'POST',
            dataType: 'JSON',
            url: 'vote/yes',
            data: $(this).serialize(),
            success: function(vote) {
                if (vote['computed'] === true) {
                    $('.text-success').show();
                    $('.text-success').html(vote['message']);
                } else if (vote['computed'] === false) {
                    $('.text-danger').show();
                    $('.text-danger').html(vote['message']);
                }
            }
        })
    }
    isyes();
})
Why? You have some Load and I’m not seeing?
Post your html code to help answer.
– Marcelo Junior
Try to put the function
isyesoutside the$('form#yes').on('click', function() {});– Darlei Fernando Zillmer