Override existing $ function, fixed a few event module issues

This commit is contained in:
Timothy Warren 2011-06-16 12:19:47 -04:00
parent a41e850db9
commit ef2dcf4ac6
2 changed files with 12 additions and 8 deletions

View File

@ -18,13 +18,13 @@ Browser support: IE8+, Latest versions of Firefox, Chrome, Safari, Opera
functions: functions:
* Get: * Get:
Use: Use:
$_.get(url, data_object, callback); $_.get(url, data_object, callback);
* Post: * Post:
Use: Use:
$_.post(url, data_object, callback); $_.post(url, data_object, callback);
**QS**: querystring parsing and serialization for hashbang strings, and pushState urls **QS**: querystring parsing and serialization for hashbang strings, and pushState urls

6
kis.js
View File

@ -26,7 +26,7 @@
return (x.length === 1) ? x[0] : x; return (x.length === 1) ? x[0] : x;
}; };
window.$ = window.$ || $; window.$ = $;
/** /**
* Ajax * Ajax
@ -272,6 +272,8 @@
add: function(sel, event, callback) add: function(sel, event, callback)
{ {
var i,len; var i,len;
if(!sel){return false;}
if(sel.length) if(sel.length)
{ {
@ -290,6 +292,8 @@
{ {
var i, len; var i, len;
if(!sel){return false;}
if(sel.length) if(sel.length)
{ {
len = sel.length; len = sel.length;