1 var jQuery = this.jQuery || "jQuery", // For testing .noConflict()
3 originaljQuery = jQuery,
7 function define(module, dependencies, callback) {
8 commonJSDefined = callback();
12 * Returns an array of elements with the given IDs, eg.
13 * @example q("main", "foo", "bar")
14 * @result [<div id="main">, <span id="foo">, <input id="bar">]
19 for ( var i = 0; i < arguments.length; i++ ) {
20 r.push( document.getElementById( arguments[i] ) );
27 * Asserts that a select matches the given IDs * @example t("Check for something", "//[a]", ["foo", "baar"]);
28 * @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baa
32 var f = jQuery(b).get(), s = "";
34 for ( var i = 0; i < f.length; i++ ) {
35 s += (s && ",") + '"' + f[i].id + '"';
38 same(f, q.apply(q,c), a + " (" + b + ")");
42 * Add random number to url to stop IE from caching
44 * @example url("data/test.html")
45 * @result "data/test.html?10538358428943"
47 * @example url("data/test.php?foo=bar")
48 * @result "data/test.php?foo=bar&10538358345554"
51 return value + (/\?/.test(value) ? "&" : "?") + new Date().getTime() + "" + parseInt(Math.random()*100000);