diff mquery.js @ 25:4d87c38404d6

List literals, fixes to implicit self property lookup, import statement and editor improvements
author Mike Pavone <pavone@retrodev.com>
date Mon, 02 Apr 2012 22:28:48 -0700
parents 068d63627b16
children 668f533e5284
line wrap: on
line diff
--- a/mquery.js	Tue Mar 27 00:39:32 2012 -0700
+++ b/mquery.js	Mon Apr 02 22:28:48 2012 -0700
@@ -13,13 +13,13 @@
 	}
 }
 
-function q(query)
+function q(query, el)
 {
-	return document.querySelector(query);
+	return el === undefined ? document.querySelector(query) : el.querySelector(query);
 }
-function qall(query)
+function qall(query, el)
 {
-	return document.querySelectorAll(query);
+	return el === undefined ? document.querySelectorAll(query)  : el.querySelectorAll(query);
 }
 
 function hide(el)