How to put a popup on the page!

Good afternoon everyone, could you please tell me something to show me how I put an informative popup on the screen for the user?

Do you mean something like this

1 Like

You know those popups that when entering the site it appears in the middle of the screen with a warning, this is the type I would like to put on mine!

Can you be more specific, or show us an example on another website? There are many possible ways to implement popups. Do you want the popup to be open upon page load, or appear after a certain amount of time, or when the user clicks a button, or when they scroll to a certain place on the page?

Bootstrap includes certain components that can create various types of “popups” including Alerts, Toasts, Popovers or Modals. Most will require adding some custom code.

Have you searched the online library for “popup”, “alert” or “cookie”? There are some Bootstrap 4 components available, though nothing for Bootstrap 5, because most of these components used Jquery, and BS did away with JQuery. There are a variety of different ways to trigger alerts in BS5

1 Like

The easiest way would be to use a modal

In BS 5 just use this javascipt (assuming the modal has an id of popup):

var popupModal = new bootstrap.Modal(document.getElementById(‘popup’))

It would probably be best to use a cookie and wrap the “” in a function so it doesn’t show all the time

hey thanks for the example

small question aside, where does the cookie mangament tool come from?
is that a part of the BSS? Where can I find it? am amazed

It is not part of BSS.
I shared the banner in the online library search for Cookie Banner

1 Like

See the example here:
And here: html - The easiest way to automatically open a popup? - Stack Overflow