Removed selector function from global scope, .(selector).el does the same thing

This commit is contained in:
Timothy Warren 2011-07-08 13:21:21 -04:00
parent a3f270ba95
commit 9014a081ab

73
kis.js
View File

@ -18,40 +18,7 @@
return;
}
var $_, $, sel;
/**
* $_
*
* Constructor function
*/
$_ = function(sel)
{
//Get the DOM objects from the selector
sel = $(sel);
//Have window be default selector, just in case
if(typeof sel === "undefined")
{
sel = (typeof $_.el !== "undefined")
? $_.el
: window;
}
$_.el = sel;
return $_;
};
$_ = window.$_ = window.$_ || $_;
//console.log polyfill
if(typeof window.console === "undefined")
{
window.console = {
log:function(){}
};
}
var $_, $;
/**
* $
@ -81,7 +48,41 @@
return (x.length === 1) ? x[0] : x;
};
window.$ = $;
/**
* $_
*
* Constructor function
*/
$_ = function(sel)
{
//Get the DOM objects from the selector
sel = $(sel);
//Have window be default selector, just in case
if(typeof sel === "undefined")
{
sel = (typeof $_.el !== "undefined")
? $_.el
: window;
}
$_.el = sel;
return $_;
};
//Set global variables
$_ = window.$_ = window.$_ || $_;
//console.log polyfill
if(typeof window.console === "undefined")
{
window.console = {
log:function(){}
};
}
// --------------------------------------------------------------------------
$_.each = function (callback)
{
@ -673,6 +674,8 @@
console.log("Property " + prop + " nor an equivalent seems to exist");
}
// --------------------------------------------------------------------------
d = {
addClass: function (c)
{