Changed $.click to $.on('click' events per Larry's code review comment