js code cleanup
select tooltip after creating it