MCPcopy Index your code
hub / github.com/Phlow/feeling-responsive / S

Function S

assets/js/javascript.js:84–101  ·  view source on GitHub ↗
(selector, context)

Source from the content-addressed store, hash-verified

82 // returns jQuery object. Only use where
83 // getElementById is not available.
84 var S = function (selector, context) {
85 if (typeof selector === 'string') {
86 if (context) {
87 var cont;
88 if (context.jquery) {
89 cont = context[0];
90 if (!cont) return context;
91 } else {
92 cont = context;
93 }
94 return $(cont.querySelectorAll(selector));
95 }
96
97 return $(document.querySelectorAll(selector));
98 }
99
100 return $(selector, context);
101 };
102
103 // Namespace functions.
104

Callers 2

javascript.jsFile · 0.70
bindingsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected