Topic: Modal content loading

pawled free asked 2 years ago

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

Dawid Wajszczuk staff answered 2 years ago


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: show.mdb.modal event is triggered earlier. More information can be found here under the API tab.

Keep coding,

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: 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