$(".eventName").click(
function () {
var eventId = $(this).attr('id');
var role = $(this).attr('dir');
var todo = 'viewDetails';
$("#details").load("plugins/company_calendar/calendar.php?eventId="+ eventId +"&todo="+ todo +"&role="+ role );
$(this).find('.eventDetails').css("left", $(this).position().left + 20);
$(this).find('.eventDetails').css("top", $(this).position().top + $(this).height());
$(".eventDetails").fadeIn(10);
}
);
是否可以在详细信息中附加我加载的数据?
最佳答案
抱歉加载只是用结果替换了元素的内容。
你应该这样做
$.get("plugins/company_calendar/calendar.php?eventId="+ eventId +"&todo="+ todo +"&role="+role, function(response) {
$("#details").append(response);
});
关于javascript - 我可以同时在Jquery 中使用Append 和Load 功能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9800935/