callback for .trigger function

前端 未结 4 1051
北海茫月
北海茫月 2021-01-29 03:54

I have the following code:

 $(\"#scheduleLink\").trigger(\"click\");
 alert(\"text\")

This is the click handler:

$(\"#scheduleL         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-29 04:32

    Use the .load Callback

    $("#publicationBlockContent")
        .load("/Publication/EventSchedule?eventId=" + eventId + "&type=" + type,
              function(){alert("text");}
        );
    

    rtm http://api.jquery.com/load/ for additional callback parameters etc.

提交回复
热议问题