How to initialize an Elgg JS function?

Conventional jQuery function works using my_function() but elgg.my_plugin.my_function doesn't work?