Modal content loading


Topic: Modal content loading

pawled asked 3 years ago

How to load images in modal only after opening? Currently they are all preloaded.


Dawid Wajszczuk staff answered 3 years ago

Hi,

Try using show.mdb.modal or shown.mdb.modal events. Simply add source for your image when the event gets fired. Here is the snippet showing how to do it with shown.mdb.modal event, so as you can see that image is loaded after the modal has been opened: https://mdbootstrap.com/snippets/standard/d-wajszczuk/3263018#html-tab-view. show.mdb.modal event is triggered earlier. More information can be found here https://mdbootstrap.com/docs/standard/components/modal/ under the API tab.

Keep coding,
Dawid


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
  • User: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: Any
  • Browser: Any
  • OS: Any
  • Provided sample code: No
  • Provided link: No