shariff icon indicating copy to clipboard operation
shariff copied to clipboard

Add default callback functions

Open thomasfrobieter opened this issue 4 years ago • 0 comments

Would be very nice to have some callback functions, especially 'init'.

I know, it's possible to add callbacks with the custom initialisation, but if Shariff is used for eg. as a Drupal Module, it would be senseless complicated to write a custom initialisation just to have a callback. From my point of view, it would be enough to fire a $(document).trigger('shariff:init'); after Shariff is initialised.

Use case example: We added a simple Instagram link (within the .shariff > ul) with jQuery, to do this we needed to use window.onload plus timeout.. and this really sucks.

thomasfrobieter avatar Jun 15 '20 11:06 thomasfrobieter