can e.preventDefault() be reversed?

后端 未结 3 1896
旧巷少年郎
旧巷少年郎 2021-01-18 11:19

i am looking for a way to .preventDefault() to make a transition and then allow the default behavior

$(\'.withTrans\').click(function(e){
    e.preventDeault         


        
3条回答
  •  佛祖请我去吃肉
    2021-01-18 11:45

    assuming you are trying to follow a link after the animation is complete:

    $('.withTrans').click(function(e){
        $(this).animate('opacity','0',300,function(){
              window.location= this.href;
        });
        return false;
    });
    

提交回复
热议问题