Home > Software design >  How to make a popup like the Emoji Button
How to make a popup like the Emoji Button

Time:12-07

There is this script that someone made that you can click a button and it will open a little popup window and an emoji keyboard will show. Then you can click away and it'll close. How can I make something like that, but instead of an emoji keyboard showing up, it's a .html page

Example index.html

<!DOCTYPE html>
<html>

<head>
  <title>Emoji Test</title>
  <script src="emoji-button.min.js"></script>
  <script>
    document.addEventListener('DOMContentLoaded', function() {
      var picker = new EmojiButton();
      var button = document.querySelector('#emoji-button');
      button.addEventListener('click', function() {
        picker.showPicker(button);
      });
    });
  </script>
</head>

<body>
  <h1>Emoji Button</h1>
  <button id="emoji-button">           
  • Related