You could add a class say, "nochange" check for that on hover, if found, no dothing, if not, continue to change.

davebowker wrote:
Hey,

I'm trying to get a little hover script running. It's using the
hoverIntent plugin, but substituting that for hover will work for this
example.

What I'm trying to do is hover a link which will fade out a paragraph,
change the contents of that paragraph, and then fade that paragraph
back in. I have that working in my code so far.

The bug I'm trying to fix is that when I hover over the now active
link again, it repeats the fadeOut > change contents > fadeIn script
again, but as the content has already been changed it just becomes an
annoying fadeOut fadeIn effect.

Any help would be greatly appreciated.

Here's my code.

$('ul.sub-text-points li a.point-1').hover(function() {
        $('a.point-2, a.point-3').removeClass("current_point");
        $(this).addClass("current_point");
        $('p.sub-text').fadeOut(300, function(){ /* Looks like this is the
start of the problem? */
                $(this).html('Changed text');
                $(this).fadeIn(300);
        });},
        function() {
});

Reply via email to