Fixed additional formatting issues

This commit is contained in:
Timothy Warren 2011-06-29 11:45:39 -04:00
parent ce361b8515
commit a15ce1102c

35
kis.js
View File

@ -50,7 +50,9 @@
callback = function (){}; callback = function (){};
} }
var request = (typeof window.XMLHttpRequest === "function") ? new XMLHttpRequest() : false; var request = (typeof window.XMLHttpRequest === "function")
? new XMLHttpRequest()
: false;
var type = (isPost) ? "POST" : "GET"; var type = (isPost) ? "POST" : "GET";
@ -309,12 +311,16 @@
len = sel.length; len = sel.length;
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
(add === true) ? attach(sel[i], event, callback) : remove(sel[i], event, callback); (add === true)
? attach(sel[i], event, callback)
: remove(sel[i], event, callback);
} }
} }
else else
{ {
(add === true) ? attach(sel, event, callback) : remove(sel, event, callback); (add === true)
? attach(sel, event, callback)
: remove(sel, event, callback);
} }
}; };
@ -384,11 +390,15 @@
//Determine what to do with the attribute //Determine what to do with the attribute
if (typeof value !== "undefined" && value !== null) if (typeof value !== "undefined" && value !== null)
{ {
(doAttr === true) ? sel.setAttribute(name, value) : sel[name] = value; (doAttr === true)
? sel.setAttribute(name, value)
: sel[name] = value;
} }
else if (value === null) else if (value === null)
{ {
(doAttr === true) ? sel.removeAttribute(name) : sel[name] = null; (doAttr === true)
? sel.removeAttribute(name)
: sel[name] = null;
} }
return (typeof value !== "undefined") ? value : oldValue; return (typeof value !== "undefined") ? value : oldValue;
@ -505,8 +515,7 @@
{ {
sel = $(sel); sel = $(sel);
this.each(sel, function (e) this.each(sel, function (e){
{
_class(e, c, true); _class(e, c, true);
}); });
}, },
@ -514,8 +523,7 @@
{ {
sel = $(sel); sel = $(sel);
this.each(sel, function (e) this.each(sel, function (e){
{
_class(e, c, false); _class(e, c, false);
}); });
}, },
@ -525,8 +533,7 @@
if (sel.length > 1) if (sel.length > 1)
{ {
this.each(sel, function (e) this.each(sel, function (e){
{
e.style.display = "none"; e.style.display = "none";
}); });
} }
@ -550,8 +557,7 @@
if (sel.length > 1) if (sel.length > 1)
{ {
this.each(sel, function (e) this.each(sel, function (e){
{
e.style.display = type; e.style.display = type;
}); });
} }
@ -573,8 +579,7 @@
} }
else if (sel.length > 1 && typeof value !== "undefined") //You can set a bunch, though else if (sel.length > 1 && typeof value !== "undefined") //You can set a bunch, though
{ {
this.each(sel, function (e) this.each(sel, function (e){
{
_attr(e, name, value); _attr(e, name, value);
}); });
} }