add js function to follow widget