Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!

joelgrondrup free asked 4 years ago


Hi guys.

I've added a div with this code:

<div class="alert fade show mt-3" id="placement-example" data-position="top-right" data-hidden="true" data-width="25%" role="alert" data-color="primary"> Show me wherever you want! </div>

And then I add this javascript:

<a class="btn btn-primary btn-lg"
  onclick="mdb.Alert.getInstance(document.getElementById('placement-example')).show();" role="button">Click me to show alert</a>

But it's not showing the alert.

What am I doing wrong?


joelgrondrup free answered 4 years ago


Ok, thanks.

Will do that.


Mikołaj Smoleński staff commented 4 years ago

Did that solve the problem? Best regards


joelgrondrup free commented 4 years ago

Yes. Thanks......


Krzysztof Wilk staff answered 4 years ago


Hi!

Just remove the .show class from your toast. Thanks for reporting this issue - that's a typo in our documentation :)

Best regards



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: 2.0.0
  • Device: Macbook
  • Browser: Chrome
  • OS: Mac OS 10.15.7
  • Provided sample code: No
  • Provided link: No
Tags