Click Outside to Close Modal | Close HTML dialog Element by Clicking Out

Поділитися
Вставка
  • Опубліковано 1 гру 2024

КОМЕНТАРІ • 10

  • @FabioMusanni
    @FabioMusanni  Рік тому +1

    ⚠️ 🚨 *IMPORTANT:* place the script tag inside the body!
    ⬇️ *LEARN ON THE BEST LEARNING PLATFORMS (LINKS BELOW)* 😉💪 ⬇️
    ☕ *Buy me a coffee:* www.buymeacoffee.com/fabiomusanni
    ❤️ *Support me monthly:* www.patreon.com/FabioMusanni
    😍 *One-off donation:* www.paypal.me/FabioMusanni/
    *SKILLSHARE*
    _(Web Dev, UI/UX Design, Python, Music, Art, Animation and a lot more)_
    🔗 skillshare.eqcm.net/5gxzD2 (Affiliate)
    *COURSERA WEB DEVELOPMENT*
    _(Full Stack, Front-End, Back-End, Web Design and a lot more):_
    🔗 imp.i384100.net/EKWxBW (Affiliate)
    *DATACAMP*
    _(Python, ChatGPT, SQL, Power BI, and more)_
    🔗 datacamp.pxf.io/vN1bDj (Affiliate)
    *COURSERA PYTHON*
    _(For beginners, Data Science, Data Analysis, AI, Cybersecurity and a lot more):_
    🔗 imp.i384100.net/k0Nk60 (Affiliate)
    Thank you for the support!❤
    🎥All my videos about web dev: ua-cam.com/play/PLs8qUrmRvaR3_p-UwLFvQ2NySkORSYUiB.html

  • @sara.j.w
    @sara.j.w 11 місяців тому

    Dude! Thank you for this, got the light dismiss working on my site again. The only change I had to make was some looping as I have several dialogs on one page:
    const modalLightDismiss = ( () => {
    const dialogs = document.querySelectorAll('dialog');
    for (const dialog of dialogs) {
    dialog.addEventListener('click', (event) => {
    if (event.target === dialog) dialog.close()
    });
    }
    })();

    • @FabioMusanni
      @FabioMusanni  11 місяців тому

      Thank you for the comment! Glad the video was helpful 💪😉

  • @Akshay-nc5gi
    @Akshay-nc5gi 5 місяців тому

    Thanks sir
    It's a good video

    • @FabioMusanni
      @FabioMusanni  4 місяці тому

      Thank you for the comment! 😍💪

  • @sadnansakibsiam9871
    @sadnansakibsiam9871 Місяць тому

    Listing the same thing can be frustrating. Document key points to streamline communication and keep it short and simple for a more professional approach

  • @AlphaTech-y3y
    @AlphaTech-y3y Місяць тому

    now i found direct one

  • @christianjack1250
    @christianjack1250 6 місяців тому +1

    Event is deprecated?

  • @cgianimationtv1828
    @cgianimationtv1828 Рік тому

    Please 🙏 code a functional subscription model

  • @explorster
    @explorster 8 місяців тому +1

    Good video. You just repeated yourself for over 7 minutes.