jQuery Curtain 0.5.2
Just a few small changes.
- Streamlined the code for removing curtains, which might be a small performance boost.
- Removed an unnecessary call to makeArray in the get code.
- Changed it to add the image as a hidden element then show it after it finishes loading. This is to prevent the user from seeing the image flash from the top left corner to the center of the screen in certain instances.
- Most importantly, I fixed a bug that was causing the passed in options to be discarded.
- The
curtain()function that would create the curtains and return the curtained elements. - A
curtainRemove()that would remove the curtains. - A
curtainRetrieve()that would return the curtains instead of the curtained elements.
curtain() function to return the curtains instead of the curtained elements. This seems like a better solution from an API perspective, but it would break your ability to chain the curtain call with other calls on the curtained objects. That isn't necessarily a big deal as certain functions already break the ability to chain. If we do that, then the API would just have curtain({options}), which would double as creating them and getting them. You could then call $("...").curtain().remove(); to destroy them all.
Breaking the chaining seems like the cleanest solution to me. If you have any thoughts on the subject, please e-mail me, tweet me, or leave a comment.