I have some common Javascript which I would like to execute on the event of any NyroModal dialog being opened.
How do I assign an event handler for, say, the ‘on load’ (or whatever) event of the NyroModal component?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
All of the NyroModal’s event handlers can be set in its ‘options’ object, which you can set using the ‘$.nmObj’ function (by passing an object containing the keys/values you want to set).
To handle the on-load of a popup, you probably want the ‘afterShowCont’ handler:
See a full list of events here: http://nyromodal.nyrodev.com/#filters
Note: The ‘nm’ parameter will contain an instance of the NyroModal object, which allows you to alter the content, manipulate the NyroModal, etc.