I am getting error when I am calling modal like this
setTimeout(function() { $('#site-pop-up').modal('show'); }, 2000);
Error in console:
Uncaught Error: cannot call methods on modal prior to initialization; attempted to call method 'show'
Anyone have solution for this?
Thanks
Best Answer
Add your code in
require
so that it will execute with jquery and modal is ready