0

i have a problem when attemp put this Bootstrap "tooltip" into a conditional, the problem is that not show it. I show you my code:

$(document).ready(function () {
$("._diifem_").prop("disabled", true);
$('#wall').on('keyup', function () {
    var textarea_value = $("#wall").val();
    if (textarea_value.length > 5) {
        $('._diifem_').prop({
            disabled: false,
        });
    } else {
        $('._diifem_').prop({
            disabled: true
        }).tooltip({
            title: 'Hola',
            trigger: "click"
        });
    }
  })
});

The class "._diiefem" = Button that will be hidden. The ID "#wall" = textarea

what am I doing wrong? :(

Thanks everyone :3

1 Answer 1

0

Look at the accepted answer of this question. Disabled buttons don't fire of any DOM events, I suspect that's why you're experiencing issues.

Check out some of the other answers to that question for possible workarounds. I think you'd probably be best off by faking a disabled button using the .disabled css class in Bootstrap.

Sign up to request clarification or add additional context in comments.

1 Comment

The problem with the .disabled class is that the button "status" is not updated :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.