D3.js and jQuery mix for directed graph editing