How to Auto Popup a CSS3 Modal Window When Page Loads?

前端 未结 3 624
北荒
北荒 2020-12-10 20:17

i am trying to figure this out.How o i make it work on page Load.

my css

.modalDialog {
    position: fixed;
    font-family: Arial, Helvetica, sans-         


        
3条回答
  •  南方客
    南方客 (楼主)
    2020-12-10 21:12

    load() is deprecated as version 1.8, My suggestion:

    window.onload = function (){
        $("#preloader").delay(1000).fadeOut(1000);
        $('#notLoggedModalClick').click();
    }
    

    but its better if you directly fire the popup instead of click the trigger.

提交回复
热议问题