Adds possibility of specifying HTMLElement or jQuery object as target #166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One thing I felt missing from the lib was a way, like the title says, to specify an HTMLElement or jQuery object as a target - in a project, I found myself having to create unique ids via
uuid
s in order to target the toasts to a big number of dynamic elements.This functionality would avoid that.
I took the liberty of also adding the support for jQuery objects - I've seen other libraries do it too as an extra service, but if you believe it might give the wrong idea that the library depends on jQuery to users it might be better to remove it.
One thing: You'll notice I only uploaded the updated
dist/css/iziToast.min.css
anddist/css/iziToast.min.js
files - I ran thegulp
command but only the minified versions were built. I've sadly barely used gulp so I'd like to know what I did wrong so I can fix this.