combined use of events from d3 in javascript and ipython's interact

This is a rework of 
https://github.com/jakevdp/mpld3/pull/260

Focused on just one example.