From 0fca7435f78fab6962ad29f341f9d84404cbdd60 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Tue, 28 Jun 2011 08:00:12 -0400 Subject: [PATCH] Made callback optional for ajax requests --- kis.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/kis.js b/kis.js index 3be58fb..6b29e29 100644 --- a/kis.js +++ b/kis.js @@ -63,6 +63,11 @@ }, _do: function(url, data, callback, isPost) { + if(typeof callback === "undefined") + { + callback = function(){}; + } + var request = this._req(); var type = (isPost) ? "POST" : "GET"; @@ -259,7 +264,7 @@ * * Event api wrapper */ - (function(){ + (function(){ var attach, remove, add_remove, e; if(document.addEventListener) @@ -433,12 +438,6 @@ var cName = (cs.length > 1) ? cs.join(" ") : cs[0]; - //Check if trim method exists - if(cName.trim) - { - cName = cName.trim(); - } - if(typeof sel.className !== "undefined") { sel.className = cName;