Add AMD support to jQuery.Transit architecture#64
Closed
levi wants to merge 3 commits intorstacruz:masterfrom
Closed
Add AMD support to jQuery.Transit architecture#64levi wants to merge 3 commits intorstacruz:masterfrom
levi wants to merge 3 commits intorstacruz:masterfrom
Conversation
…orm). Namespace the transit transform property, so it doesn't conflict.
… performance of a few loops by using straight for loops rather than jQuery each iterators. Remove the transformOrigin and transition CSS hooks when using jQuery 1.8+, as jQuery now does those natively. Renamed the tranform hook to transit:transform to diaambiguate it from the browser's transform property, which fixes the issues from my previous patch.
Owner
|
Hm, I'm not convinced this is the right approach for everyone. Not all AMD environments has jQuery loaded via AMD, in which case, this will fail. |
Owner
|
Closing this for now unless someone can contribute a better solution, perhaps a custom build script to make an AMD version. Discussions still welcome. |
Author
|
jQuery is exposed by default as an AMD module whenever there is an AMD-compatible adapter loaded into global scope. This will work regardless of Require.js, since this implements the UMD spec, a universal definition for AMDs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I was unable to load jQuery.Transit in my Require.js environment. I wrapped the plugin in a method provided by the UMD spec to optionally allow it to export its namespace in an AMD when available. More info about the code update here: https://github.com/umdjs/umd