I'm using SimpleModal in a SharePoint ContentEditorWebPart and it works great. However, I want to programatically close the window. I've tried different variations of the solution proposed here using $.modal.close():
How do you close a jQuery Simplemodal?
However, if I place "$.modal.close();" ANYWHERE in my script SimpleModal stops working... the text for my Modal pop up box displays ON the screen, the pop up box no longer appears at all.. it's as if I'm not using SimpleModal at all... If I comment out "$.modal.close();" the pop up box works fine again, but I have to click the "X" to close it...
What the heck am I doing wrong?