Automatic modal when starting home page

i tried to replicate the automated modal, which is opened every time the page is loaded, that @Pealco (thank you!!!) exemplifies in this thread.

but i just cant do it. seems like i am blind and/or totally stupid.

i’ve uploaded a small test-bloc, if anyone could help, i would really appreciate this very, very much:
www.thegatescontinuum.com/test_aut_modal.zip

thanks a million times in advance!!!

To simplify your life you might want to get your hands:

@jerry thank you very much. i purchased nearly all addons from whittfield (except cadence) and i love them. But he is missing since april and i think, theres a good chance the brics won`t be updated.

and actually i really want to see what i am doing wrong, so i can learn …

The script uses jQuery which is replaced with pure javascript in Bootstrap 5. In short, you will need to modify this. It should be working when you choose Bootstrap 4 as framework.

@Jerry okay, what shall i do, open a new thread and ask for answers? because i rather don`t want to spam the forum and i want to use bootstrap 5?

i simply would like to get the answer, how an automated modal at loading the page is doable in blocs 5 :slight_smile:

thank you very much in advance

That is a contradiction to what you mentioned earlier:

Without testing, something like this should work:

document.addEventListener("DOMContentLoaded", function() {
    var modal = document.getElementById(‘#my-fancy-modal);
    if (modal && modal.classList) {
        modal.classList.add('show');
        if (modal.classList.contains('fade')) {
            modal.style.display = 'block';
        }
    }
});

@jerry thank you, but it doesn*t work, i put it as script in the header and changed the modal ID …

and btw. it´s no contradiction. Many people have very different ways of learning and i think that everybody has the right and should have the opportunity to find her or his way. i by the way am neurodivergent, have ADHD and have a very different way of learning to most people i know.

For me, it does… :thinking::

Small Potato 2023-10-27 at 20.21.18

1 Like

@Jerry would you please just write down, what i have to put where? thank you very much in advance.

I replaced your script with my script, that’s all I did.

1 Like

@jerry thats cool, would you send me the file, because i just don´t know where the mistake could be?

@Jerry … please, keep cool :wink:

Your question has been thoroughly addressed by me, and it’s a pleasure to assist individuals like you. Along with a few others, I am here to provide help at no cost. However, my assistance only extends to providing solutions, as I have done.

1 Like

@smalltiger I think Jerry has tried to help you, just as he has helped countless others, freely giving up his own time for no reward.

I would appreciate if you could close this topic. The question has been answered and the questioner has become personal with a forum member.

2 Likes