I need to put a picture to open automatically when I visit the site, but I'm kind of lost in it.
I need to put a picture to open automatically when I visit the site, but I'm kind of lost in it.
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
});