a js based code that can gradually be used as UI menu element