eesur
Needed a simple solution to move a legend back and forth. This example shows the logic and uses javascripts offsetLeft to move the item (li in this case)
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js