Jquery - Perform callback after append

后端 未结 4 1301
独厮守ぢ
独厮守ぢ 2020-12-15 03:25

I am appending content to a list using:

  $(\'a.ui-icon-cart\').click(function(){
         $(this).closest(\'li\').clone().appendTo(\'#cart ul\');
  });
         


        
4条回答
  •  执念已碎
    2020-12-15 04:24

    You can just keep chaining further operations at the semicolon.

    $(this).closest('li').clone().appendTo('#cart ul').addClass('busy').fade('fast');
    

    etc

提交回复
热议问题