Last active
December 11, 2015 12:08
-
-
Save ezhlobo/4598604 to your computer and use it in GitHub Desktop.
JS framework:
overall
This file contains 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
(function() { | |
var root = this, | |
_tool = root.tool, | |
_$$ = root._$$, | |
tool = function(selector, context) { | |
return new tool.fn.init(selector, context); | |
}; | |
tool.fn = tool.prototype = { | |
init: function() { | |
return this; | |
} | |
}; | |
// jQuery Magic | |
tool.fn.init.prototype = tool.fn; | |
// | |
tool.fn.METHOD = function() { | |
return this; | |
} | |
// | |
root.tool = root.$$ = tool; | |
tool.noConflict = function() { | |
if (root.$$ === tool) { | |
root.$$ = _$$; | |
} | |
if (root.tool === tool) { | |
root.tool = _tool; | |
} | |
return tool; | |
}; | |
})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment