jQuery.click() vs onClick

前端 未结 17 1472
情话喂你
情话喂你 2020-11-21 07:35

I have a huge jQuery application, and I\'m using the below two methods for click events.

First method

HTML

17条回答
  •  北海茫月
    2020-11-21 08:20

    You could combine them, use jQuery to bind the function to the click

    Some Content
    $('#myDiv').click(divFunction); function divFunction(){ //some code }

提交回复
热议问题