I have a huge jQuery application, and I'm using 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 use either the first or second method in my application. Which one is better? Better for performance? And standard?