Added "global" JS method for event adding