Prevent jquery animation to triggering than once.

https://blog.csdn.net/u013239476/article/details/103155634
同时调整外部的div,让其跟着内部的图片动画一同改变大小,防止出界等不美观的情况‘
还有jquery的each函数 同一个动画绑定多个元素

动画效果

$(function(){
var anime = $('div.part-2 .pic img'),
div = $('.part-2');

anime.each(function(){
    $(this).mouseenter(function(){
        $(this).stop(true,false).animate({
            width:'200px',
            height:'200px'        
        },250)
        div.stop(true,false).animate({
            height:'308px',
        },250)
    })
    $(this).mouseleave(function(){
        $(this).stop(true,false).animate({
            width:'100px',
            height:'100px'  
        },200)
        div.stop(true,false).animate({
            height:'208px',
        },200)
        
    })
})

})