Last active
August 29, 2015 13:56
-
-
Save mandelbro/8868731 to your computer and use it in GitHub Desktop.
Zepto/jQuery Wrapper
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
/** | |
* A simple JavaScript wrapper that will provide allow | |
* you to take advantage of the ZeptoJS library if it | |
* is available, and fallback to jQuery if not. | |
* | |
* Based on this pattern explanation from Stack Overflow: | |
* http://stackoverflow.com/a/502068 | |
*/ | |
;(function( $, window, undefined ) { | |
// code goes here | |
$(function() { | |
console.log("do something..."); | |
}); | |
})( (window.Zepto || window.jQuery), this ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment