我有一个ajax调用可以正常工作,除了FF慢慢滚动顶部。任何想法可能是这个的原因。
$("#delete-team-dialog .btn-danger").unbind("click").click(function () {
var contextPath = $.trim($("#context_path").text());
$.ajax({
type : 'DELETE',
url : contextPath + "/team/" + teamId,
cache : false,
success : function(data) {
$(li).closest(".entered_teams_container").find(".number-of-teams").text(numberOfTeams -1);
li.remove();
$("#delete-team-dialog").modal('hide');
startFormChanged();
updateNumberOfParticipants();
//If no teams left reload the page for redirect.
if($(".team-row").length === 0){
window.location.reload(true);
}
},
error : function(jqXHR, textStatus, errorThrown) {
alert("....");
}
});
});
修改:部分HTML
<ul class="entered_teams">
<#list class6 as team>
<li class="row-fluid team">
<div class="span2">${((team.heat.date)?string("HH:mm"))!}</div>
<div class="span7 team">
${team.enrollment.organization.name!?html}, 6. trinn, lag${team.number?c} <#if !team.complete ><i class="icon-warning-sign text-error"></i></#if>
</div>
<span class="delete pull-right"><i class="icon-trash"></i> Delete</span>
<span class="edit pull-right">
<i class="pencil"></i> Edit</span>
<div class="team_setup row-fluid">
<button class="btn update-event-button">Save</button>
</div> <span class="team-id hidden">${team.id?c}</span>
</li>
</#list>
</ul