Reputation: 12874
I am using JQuery slideUp and slideDown on this site of mine.
http://ourrecipes.mdssoftware.com.au/
In IE this works fine. But in Chrome when the slideDown completes the page jitters for a second, as you will see.
There is alot code so I dont want to post it.
But this is the javascript that does slide calls.
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');
}
});
Upvotes: 0
Views: 62
Reputation: 5322
To simplify the problem, if I type this into the js console, I duplicate the problem:
$("#divrecipe").slideUp("slow");$("#divrecipe").slideDown("slow")
If I comment out the following css for #divrecipe:
/* height: 96%; */
then rerunning my test code doesn't exhibit the same effect.
Upvotes: 1