PaulP
PaulP

Reputation: 1935

Animation clipping image

I want to get a animation clipping image effect but I don't know how. This don't work.

#img {
    background: url('i1.jpg');
    width: 0;
    height: 0;
}   

<a href="#">link</a>
<div id="img"></div>    

$(function(){
    $('a').click(function(){
        $('img').animate({
            width: '+=300px',
            height: '+=212px'
        });
    });
});

enter image description here

Any clues?

Upvotes: 0

Views: 279

Answers (1)

stealthyninja
stealthyninja

Reputation: 10371

@PaulP: Try

$('#img').animate({

You left out the #

Upvotes: 1

Related Questions