I am getting unexpected results with jQuery trying to set the \"click\" method of a div. Please see this jsfiddle. Be sure to open the console window. Click the word a few times
After your if, you're adding another click event to #test. It will call all click handlers when it's clicked. You probably don't need that at all since onclick is defined in the html.