Consider following code snippet:

<img src='file1.jpg' width='100' height='100'></img>
    <script>
        $('img').animate({
            'opacity':'-=0.3',
            'height':'+=100px',
            'width':'100px'
        });
        $('img').animate({
            'opacity':'-=0.5',
            'height':'-=100px',
            'width':'+=100px'
        });        
    </script>
What are the dimensions and opacity of an image after executing the code?
Explanation

    $('img').animate({
        'opacity':'-=0.3', // 1.0 - 0.3 = 0.7
        'height':'+=100px', // 100px + 100px = 200px
        'width':'100px'  // 100px
    });
    $('img').animate({
        'opacity':'-=0.5', // 0.7 - 0.5 = 0.2
        'height':'-=100px', // 200px - 100px = 100px
        'width':'+=100px' // 100px + 100px = 200px
    });

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести