Use console.log instead of alert.
Pass element ids instead of elements.
Add README.