我有一个运行良好的 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