Moved the js code for like tooltips where it can always be present

Signed-off-by: emanuele <emanuele45@gmail.com>