[jQuery] Fade Function Works in Firefox but Not in Safari?
This code works perfectly in Firefox, but in Safari, after the element fades
in, it fades out again! The alert call only fires once, so it doesn't even
seem like my call to fadeOut is even called a second time.
Here's the code.
function ScrollToDiv(theDivID)
{
$("html,body").animate({ scrollTop: $("#"+theDivID).offset().top });
}
function ReplaceFormHelpButtonsWithImageOnlyHelpButtons ()
{
var theHTMLString = ' /images/Help_Button.gif ';
$("#help_button").html(theHTMLString);
}
$(document).ready(function()
{
ReplaceFormHelpButtonsWithImageOnlyHelpButtons();
$("#HelpInfo").click(function(){
var htmlStr = $(this).html();
$(this).fadeOut('slow', function()
{
alert(htmlStr);
$("#HelpInfo").load("/GetHelp", {contents: htmlStr},
function()
{
$(this).fadeIn('slow', 'easeInCirc');
ScrollToDiv("HelpInfo");
});
}, 'easeOutCirc');
});
});
How can I fix this?
--
View this message in context: http://www.nabble.com/Fade-Function-Works-in-Firefox-but-Not-in-Safari--tf4744278s27240.html#a13566509
Sent from the jQuery General Discussion mailing list archive at Nabble.com.