woody180/vanilla-javascript-emoji-picker

call on ajax not work

Closed this issue · 5 comments

hi
after page load with ajax say error:
FgEmojiPicker is not defined

Seems like you didn't import FgEmojiPicker.js file in your page.
Can i see the print screen of your error message

this is my page
when ajax called it say FgEmojiPicker is not defined

There is no reason for you to use timeout function. First of all make sure you load/import fgEmojiPicker.js file properly. Check if 'dir' option loads 'full-emoji-list.json' file from right direction.
And one more thing - i can't understand what are you calling with ajax. If you fetch whole HTML with ajax, than load fgEmojiPicker.js file from the main document

it work with direct url but in ajax it is not work
you can test it