Changed .on( 'click' ) to .onclick( )