为什么jQuery slow()的回调函数不起作用?

为什么jQuery slow()的回调函数不起作用?,jquery,jquery-animate,Jquery,Jquery Animate,这是我的代码: $(document).ready(function() { posicionarBarraIdioma(); //This function aligns my div #barraIdioma at the bottom of the other div. $('#barraProgreso').progressbar({ value: 1 }); $('#barraIdioma').show('fa

这是我的代码:

$(document).ready(function() {
            posicionarBarraIdioma(); //This function aligns my div #barraIdioma at the bottom of the other div.

            $('#barraProgreso').progressbar({ value: 1 });

            $('#barraIdioma').show('fast',animarBarraProgreso);

        });

        function animarBarraProgreso() {
            $('.ui-progressbar-value').animate({width: 100 + '%'},1250, mostrarIdiomas);
        }     

        function mostrarIdiomas() {
            $('#barraProgreso').fadeOut(function() {
                $('#barraIdioma a').each(function(index, element){$(element).show()})
            });
        }
我需要div#barra放置到位,然后变为可见,然后动画出现。。。但是当div显示时,动画已经运行。我做错了什么



解决了!我不小心将进度条和CSS上的另一个div一起隐藏了起来。

我认为您的JavaScript很好。我使用您发布的内容创建了一个应用程序,我相信它的行为与您描述的方式相同。也许问题出在别处。你能发布你的HTML吗

我注意到的唯一错误是,您缺少分号:

    function mostrarIdiomas() {
        $('#barraProgreso').fadeOut(function() {
            $('#barraIdioma a').each(function(index, element) {
                $(element).show(); //<-- missing semicolon here
            }); //<-- missing semicolon here
        });
    }
function-mostrarIdiomas(){
$('#barraProgreso').fadeOut(函数(){
$('#a')。每个(函数(索引,元素){

$(element).show();//当它不在.show的回调中时,它是否仍然动画?我曾尝试将动画放在show效果之后,对其使用delay或setTimeout,但结果始终相同。我看到动画的唯一方法是不隐藏div(而不使用show)你能为这个做一个js提琴吗?请添加你的解决方案作为答案并接受它。这不应该出现在你的问题正文中。