I have a large jQuery application, and I'm doing the below two methods for click events.
First method*
*HTML*
<div id="myDiv">Some Content</div>
*jQuery*
$('#myDiv').click(function(){
//Some code
});
*Second method*
*HTML*
<div id="myDiv" onClick="divFunction()">Some Content</div>
*JavaScript function call
function divFunction(){
//Some code
}
I utilize either the first or second technique in my application. Which one is better? Better for execution? Also, standard?