Open Modal without Button Press


Hello all!
I am currently working on app where on the first start of the app the user is presented with a series of tutorial slides and a signin/create account page. I have a modal built for this which works fine when being called from a button but I am unable to open the modal by directly calling the function in javascript.

How would I go about opening the modal by calling a javascript function?