How to differentiate single click event and double click event?

I have a single button in li with id "my_id". I attached two jQuery events with this element 1. $("#my_id").click(function() { alert('single click'); }); 2. $("#my_id").dblclick(function(...