My webpage has a grid which contains 500 rows and 30 columns. Each cell is either a dropdown or a textbox. As of now, we are attaching 'change' events to each of these elements individually.
Recently, I learnt that JQuery event delegation using 'on' method can improve performance. t
I created two prototypes one with event delegation and one without it.
Without event delegation:
$(".event").click(function(){
alert("click");
});
With event delegation:
$("#test").on("click",".event", function(){
alert("click");
});
How should I measure the performance improvement that I get on my webpage by using event delegation?
What tools can I use and what should I measure?