how can i animate only static elements?
My code:

$(document).ready(function() {
        $("#control_panel li a").hover(
                function(){
                        $(this).animate({paddingLeft: "50px"}, 200);
                },
                function(){
                        $(this).animate({paddingLeft: "0px"},  500);
        });
});

This script slides hovered links to the right in my navigation list,
the problem is that if animation is still in progress jQuery still
registers hovering which causes unnecessary animation. You can test
this code with the follwing html:

        <ul id="control_panel">
                <li><a href="#">View Statistics</a></li>
                <li><a href="#">Create Counter</a></li>
                <li><a href="#">Embed Code</a></li>
                <li><a href="#">Help</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Options</a></li>
                <li><a href="#">Log-Out</a></li>
        </ul>

If you play around with hovering those elements you'll get a better
understanding of my problem.
Thanks.

Reply via email to