You define event handler using jQuery See: http://jsfiddle.net/8uf9M/1/ and https://stackoverflow.com/questions/12627443/jquery-click-vs-onclick