jquery animate for element attributes not style

前端 未结 5 499
心在旅途
心在旅途 2021-01-11 18:40

ASAIK jquery animate function accepts style properties only. but i want to animate the attributes of an element. consider a SVG element rectangle

         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-11 19:13

    this may fits you simple

    $("your div id").css("position", "absolute").animate({
        left: 159,
        top:  430
    });
    

提交回复
热议问题