Open a banner when accessing the site [closed]

-2

I need to put a picture to open automatically when I visit the site, but I'm kind of lost in it.

    
asked by anonymous 16.01.2017 / 13:03

1 answer

1

You can use a modal to display an image when the site loads.

There are a number of libraries that include modals, such as Bootstrap , Foundation , Bulma >, SemanticUI , etc ...

If you do not use any of them, they also have libraries that work either alone or jQuery . A quick search and found these: Vex , Tingle and SimpleModal .

Theoretically it would just add a handler to the DOMContentLoaded event in javascript.

// Com jQuery
$(document).ready(function(){
    // Criar e ativar modal aqui
})

// Sem jQuery
document.addEventListener("DOMContentLoaded", function(event) {
    // Criar e ativar modal aqui
});
    
16.01.2017 / 14:17