[英]Jquery slideDown()
I am using JQuery slideUp and slideDown on this site of mine. 我在我的这个站点上使用JQuery slideUp和slideDown。
http://ourrecipes.mdssoftware.com.au/ http://ourrecipes.mdssoftware.com.au/
In IE this works fine. 在IE中,此功能正常。 But in Chrome when the slideDown completes the page jitters for a second, as you will see. 但是,在Chrome中,当slideDown完成页面抖动一秒钟时,您将看到。
There is alot code so I dont want to post it. 有很多代码,所以我不想发布它。
But this is the javascript that does slide calls. 但这是可进行滑动调用的JavaScript。
Malcolm 马尔科姆
selectedRecipe = function (anchor) {
var href = $(this).attr("href");
var rid = href.split("-")[1];
$("#RecipeID").val(rid);
var url = "/Recipes/GetRecipeView";
$('#divrecipe').slideUp('slow');
$.ajax({
url:url,
data: { rid: rid },
beforeSend: function () { $.blockUI({ message: '<h2><img src="../Content/Images/FhHRx.gif" style="margin-top:20px;margin-right:20px"/> Loading...</h2>' }) },
complete: function() { $.unblockUI() },
success: function (data) {
$("#divrecipe").html(data);
$('#divrecipe').slideDown('slow');
}
});
To simplify the problem, if I type this into the js console, I duplicate the problem: 为了简化问题,如果我在js控制台中键入此命令,则重复该问题:
$("#divrecipe").slideUp("slow");$("#divrecipe").slideDown("slow")
If I comment out the following css for #divrecipe: 如果我将以下CSS注释为#divrecipe:
/* height: 96%; */
then rerunning my test code doesn't exhibit the same effect. 然后重新运行我的测试代码不会显示出相同的效果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.