Topic: Create toast dynamically

1robin priority asked 1 year ago


Expected behavior After clicking a button, create a element as a toast and display When page load element containing the toast doesnt exist

Actual behavior

Resources (screenshots, code snippets etc.)


1robin priority answered 1 year ago


Thanks for the snippet, Can I create the toast with jquery? I've tried the code in the documentation but it doesn't work


Grzegorz Bujański staff commented 1 year ago

Here is the jQ version of this snippet https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/5513051#js-tab-view


Grzegorz Bujański staff answered 1 year ago


You can change the content of the toast before it is displayed: https://mdbootstrap.com/snippets/standard/grzegorz-bujanski/5506283#js-tab-view


Grzegorz Bujański staff answered 1 year ago


I'm not sure what the problem is. Is it that after loading the page the toast doesn't open? Can you describe this case in more detail?


1robin priority commented 1 year ago

I dont know how to code but when page loads there's a button, but toast is not in the code when I click the button I need to create the toast and show the toast, according to certain conditions the content of the toast would change



Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.4.0
  • Device: laptop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No
Tags