shariff
shariff copied to clipboard
Add default callback functions
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.