Prevent loading the content of a hidden iframe
问题 I have many hidden <div> tags, with (display: none) , that I call upon when I want to load a jQuery modal. Each of these <div> tags contain an <iframe> which calls a different page. In order to not make my page load painfully slowly, I am wondering if there is a way to prevent the <iframe> from loading the page, until I call the <div> in the modal? 回答1: You can load the iframes after html being rendered by giving empty src in html of iframe and later assigning src by jquery / javascript. Html