【发布时间】:2013-06-03 20:55:11
【问题描述】:
我刚刚使用一些 jQuery 完成了我的第一个网站,现在我试图弄清楚如何使用 jquery 将内容添加到我的 .content div。 我正在尝试使用此代码,但显然不正确。 基本上我认为最好使用包含内容的单独文件,然后使用 jQuery 将“.append()”它们加载到 div 中。我该怎么做呢? 我现在正在使用此代码:
<div class="content"></div>
$('#about').click(function() {
$('.module1').show(600);
$('.content').animate({'width':'620'},600);
$('.content').append(
window.location.href("about.php")
);
【问题讨论】:
-
$('.content').append("about.php")应该可以工作。为什么要在两者之间添加window.location.href?
标签: php jquery append window.location