Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can also use a static positioning by specifying x/y coordinates in the constructor options parameters.

Code Block
languagejs
    jQueryjQuery("#btnEmoji").off().on("click", function() {
          if if ( window.emoji_picker.pickerVisible == true) {
          window    window.emoji_picker.hidePicker();
          } else {
          window    window.emoji_picker.showPicker( jQuery("#btnEmoji").get() );
         }
    }); }
});

When an emoji is selected, the picker will emit an emoji event, passing an object containing data about the emoji that was selected.

Code Block
languagejs
window.emoji_picker.on("emoji", function (event) {
  // Append Unicode Emoji to a textarea
  jQuery("#textareaChat").val( jQuery("#textareaChat").val() + event.emoji);
});

...