Created
May 28, 2016 12:41
-
-
Save f/4cc28146971251547e5e786d29ca3607 to your computer and use it in GitHub Desktop.
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
| (function ($) { | |
| $.module = function (module, selector) { | |
| var name = btoa(module).replace(/\W|\=/g,"") | |
| var el = selector.split(/\s+/).map(function (sub_selector) { | |
| return sub_selector.replace(/^([\.#])(.*)/g, function (_, f, s) { | |
| return f + name + "_" + s | |
| }) | |
| }).join(" ") | |
| return $(el) | |
| } | |
| })(jQuery) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment