소스 검색

Yemi - Add support for "onshow" callback

Vijayakrishnan 4 년 전
부모
커밋
3df8526e6e
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      public/js/yemi.js

+ 6 - 0
public/js/yemi.js

@@ -317,6 +317,12 @@ var initMoes = function() {
                                 setTimeout(function() {
                                     let submitButton = $(realForm).find('[submit]');
                                     if(submitButton.length) submitButton[0].scrollIntoView({behavior : "smooth", block: "nearest"});
+
+                                    // if any callback, trigger it
+                                    if($(realForm).is('[onshow]')) {
+                                        window[$(realForm).attr('onshow')].call($(realForm)[0]);
+                                    }
+
                                 }, 150);
                             }, 100);
                         }