Forms: Alerts

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #10037989
    hidroxid
    Participant

    Hello

    What is the correct way to activate from code, an alert created with the structure that you use?

    I tried to assign an ID to the div and then from Jquery try to run $(“#err_cot”).show () or $(“#err_cot”).css (“display”, “block”) and nothing.

    But if instead of putting the d-none class on the div, I put a simple style=”display: none;”, any of the above codes will work.

    Standard error code that I have seen on your pages:
    <div class = "alert alert-danger d-none mt-4" id = "err_cot">
    Error! Error message
    </div>



    Template Version: 8.3.0
    #10037993
    Support
    Keymaster

    Hello, you can use the removeClass function – https://api.jquery.com/removeclass/

    $("#err_cot").removeClass('d-none');

    Regards,

    Jonas


Viewing 2 posts - 1 through 2 (of 2 total)

This topic is marked as "RESOLVED" and can not rceive new replies.