replace jquery uses with d3