【发布时间】:2014-10-23 17:48:17
【问题描述】:
好吧..场景是
index.html
<body>
<button class="a"> loading file home2.html #home2</button>
<button class="b"> loading file index.html #home</button>
<section id ="a">
<div id="home">
blah blah blah
</div>
</section>
</body>
</html>
和第二个文件
home2.html
<div id="home2">
bleh bleh bleh
</div>
当我单击按钮 1 时,我想将 home2.html 中的所有内容 #home2 加载到 index.html 中。 我使用了 .load() 方法。然后在从home2.html加载#home2之后,我想分离#home(不仅仅是fadeOut()或hide()。但是当我单击button2再次加载#home时,#home中的所有js都不起作用。有人帮我吗?
【问题讨论】:
-
#home 里面有什么 js?你期望人们在没有看到你的 js 的情况下修复你的 js
标签: javascript jquery performance load