Add prev/next functionality to JGraph.