added elementClick event to discretebar

I added the elementClick event to discretebar in one of my projects.  It was very useful and thought it could be merged for everyone to use.