leaflet change marker location

JavaScript
marker.setLatLng(e.latlng);
Source

Also in JavaScript: