From 32db8c04c6eee6bda0a9c5c9ae547f085fe669b4 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Mon, 11 Jul 2011 13:56:23 -0400 Subject: [PATCH] fixed what I broke in the last commit ^^; --- kis.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/kis.js b/kis.js index e1466d7..a4608fa 100644 --- a/kis.js +++ b/kis.js @@ -49,10 +49,6 @@ { x = document.getElementsByTagName(a); } - else if(a.match(/^\.([\w\-]+)$/) && document.getElementsByClassName !== "undefined") - { - x = document.getElementsByClassName(a); - } else { x = document.querySelectorAll(a); @@ -87,6 +83,7 @@ //Set global variables $_ = window.$_ = window.$_ || $_; + $_.$ = $; //console.log polyfill if(typeof window.console === "undefined") @@ -156,9 +153,7 @@ var type = (isPost) ? "POST" : "GET"; - var d = (data.length > 0) ? "?"+this._serialize(data, true) : ''; - - url += (type === "GET") ? d : ''; + url += (type === "GET") ? "?"+this._serialize(data, true) : ''; request.open(type, url); @@ -369,14 +364,14 @@ { attach = function (sel, event, callback) { - if (typeof sel.addEventListener === "function") + if (typeof sel.addEventListener !== "undefined") { sel.addEventListener(event, callback, false); } }; remove = function (sel, event, callback) { - if (typeof sel.removeEventListener === "function") + if (typeof sel.removeEventListener !== "undefined") { sel.removeEventListener(event, callback, false); }