make basic tag selection work (javascript)