Permalink
Browse files

Inital Import.

  • Loading branch information...
jeresig committed Mar 22, 2006
0 parents commit 8a4a1edf047f2c272f663866eb7b5fcd644d65b3
Showing with 2,074 additions and 0 deletions.
  1. +88 −0 ajax/ajax.js
  2. +5 −0 browse/.htaccess
  3. +467 −0 browse/Pack.pm
  4. +207 −0 browse/ParseMaster.pm
  5. +85 −0 browse/browse-new.cgi
  6. +51 −0 browse/browse.cgi
  7. +17 −0 browse/copyright.txt
  8. +748 −0 core/core.js
  9. +73 −0 event/event.js
  10. +170 −0 fx/fx.js
  11. +57 −0 sort/sort.js
  12. +106 −0 tmpl/tmpl.js
@@ -0,0 +1,88 @@
// AJAX Plugin
// Docs Here:
// http://jquery.com/docs/ajax/
if ( typeof XMLHttpRequest == 'undefined' && typeof window.ActiveXObject == 'function') {
var XMLHttpRequest = function() {
return new ActiveXObject((navigator.userAgent.toLowerCase().indexOf('msie 5') >= 0) ?
"Microsoft.XMLHTTP" : "Msxml2.XMLHTTP");
};
}
$.xml = function( type, url, data, ret ) {
var xml = new XMLHttpRequest();
if ( xml ) {
xml.open(type || "GET", url, true);
if ( data )
xml.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
if ( ret )
xml.onreadystatechange = function() {
if ( xml.readyState == 4 ) ret(xml);
};
xml.send(data)
}
};
$.httpData = function(r,type) {
return r.getResponseHeader("content-type").indexOf("xml") > 0 || type == "xml" ?
r.responseXML : r.responseText;
};
$.get = function( url, ret, type ) {
$.xml( "GET", url, null, function(r) {
if ( ret ) ret( $.httpData(r,type) );
});
};
$.getXML = function( url, ret ) {
$.get( url, ret, "xml" );
};
$.post = function( url, data, ret, type ) {
$.xml( "POST", url, $.param(data), function(r) {
if ( ret ) ret( $.httpData(r,type) );
});
};
$.postXML = function( url, data, ret ) {
$.post( url, data, ret, "xml" );
};
$.param = function(a) {
var s = [];
for ( var i in a )
s[s.length] = i + "=" + encodeURIComponent( a[i] );
return s.join("&");
};
$.fn.load = function(a,o,f) {
// Arrrrghhhhhhhh!!
// I overwrote the event plugin's .load
// this won't happen again, I hope -John
if ( a && a.constructor == Function )
return this.bind("load", a);
var t = "GET";
if ( o && o.constructor == Function ) {
f = o; o = null;
}
if (o != null) {
o = $.param(o);
t = "POST";
}
var self = this;
$.xml(t,a,o,function(h){
var h = h.responseText;
self.html(h).find("script").each(function(){
try {
eval( this.text || this.textContent || this.innerHTML );
} catch(e){}
});
if(f)f(h);
});
return this;
};
@@ -0,0 +1,5 @@
RewriteEngine On
RewriteRule ^$ /docs/SourceCode/ [L,QSA]
RewriteRule ^([^/]+).js$ browse-new.cgi?v=$1 [L,QSA]
RewriteRule ^([^/]+)/$ browse-new.cgi?v=$1 [L,QSA]
RewriteRule ^([^/]+)/([a-z0-9-]+)/?$ browse-new.cgi?v=$1&custom=$2 [L,QSA]
Oops, something went wrong.

2 comments on commit 8a4a1ed

@kt3k

This comment has been minimized.

Show comment
Hide comment
@kt3k

kt3k Sep 7, 2015

Where did $.fn come from?

kt3k replied Sep 7, 2015

Where did $.fn come from?

@EarthSchlange

This comment has been minimized.

Show comment
Hide comment
@EarthSchlange

EarthSchlange Sep 7, 2015

$.fn is referring to JQuery's prototype see the source. This function basically provides a way to hook into and extend JQuery with your own custom functionality. JFiddle has an example of how this function can help a developer extend JQuery's functionality.

EarthSchlange replied Sep 7, 2015

$.fn is referring to JQuery's prototype see the source. This function basically provides a way to hook into and extend JQuery with your own custom functionality. JFiddle has an example of how this function can help a developer extend JQuery's functionality.

Please sign in to comment.