Skip to content

Commit 69f7216

Browse files
committed
Changing jQuery references to local $. Closes #67, closes #68
1 parent e86776a commit 69f7216

File tree

17 files changed

+214
-214
lines changed

17 files changed

+214
-214
lines changed

dom/animate/animate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ steal('jquery', 'jquery/dom/styles', function ($) {
212212
return oldanimate.apply(this, arguments);
213213
}
214214

215-
var optall = jQuery.speed(speed, easing, callback);
215+
var optall = $.speed(speed, easing, callback);
216216

217217
// Add everything to the animation queue
218218
this.queue(optall.queue, function(done) {

dom/animate/animate_test.js

Lines changed: 109 additions & 109 deletions
Large diffs are not rendered by default.

dom/closest/closest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ steal('jquery', function($) {
1111
*
1212
* ">li click" : function( el, ev ) { ... }
1313
*/
14-
var oldClosest = jQuery.fn.closest;
15-
jQuery.fn.closest = function(selectors, context){
14+
var oldClosest = $.fn.closest;
15+
$.fn.closest = function(selectors, context){
1616
var rooted = {}, res, result, thing, i, j, selector, rootedIsEmpty = true, selector, selectorsArr = selectors;
1717
if(typeof selectors == "string") selectorsArr = [selectors];
1818

dom/compare/compare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ steal('jquery', function($) {
2424
*/
2525

2626
// See http://ejohn.org/blog/comparing-document-position/
27-
jQuery.fn.compare = function(element){ //usually
27+
$.fn.compare = function(element){ //usually
2828
try{
2929
// Firefox 3 throws an error with XUL - we can't use compare then
3030
element = element.jquery ? element[0] : element;

dom/cookie/cookie.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ steal('jquery', 'jquery/lang/json', function($) {
4949
*
5050
* @return {String} the value of the cookie or {undefined} when setting the cookie.
5151
*/
52-
jQuery.cookie = function(name, value, options) {
52+
$.cookie = function(name, value, options) {
5353
if (typeof value != 'undefined') {
5454
// name and value given, set cookie
5555
options = options ||
@@ -59,8 +59,8 @@ steal('jquery', 'jquery/lang/json', function($) {
5959
options.expires = -1;
6060
}
6161
// convert value to JSON string
62-
if (typeof value == 'object' && jQuery.toJSON) {
63-
value = jQuery.toJSON(value);
62+
if (typeof value == 'object' && $.toJSON) {
63+
value = $.toJSON(value);
6464
}
6565
var expires = '';
6666
// Set expiry
@@ -89,7 +89,7 @@ steal('jquery', 'jquery/lang/json', function($) {
8989
if (document.cookie && document.cookie != '') {
9090
var cookies = document.cookie.split(';');
9191
for (var i = 0; i < cookies.length; i++) {
92-
var cookie = jQuery.trim(cookies[i]);
92+
var cookie = $.trim(cookies[i]);
9393
// Does this cookie string begin with the name we want?
9494
if (cookie.substring(0, name.length + 1) == (name + '=')) {
9595
// Get the cookie value
@@ -99,9 +99,9 @@ steal('jquery', 'jquery/lang/json', function($) {
9999
}
100100
}
101101
// Parse JSON from the cookie into an object
102-
if (jQuery.evalJSON && cookieValue && cookieValue.match(/^\s*\{/)) {
102+
if ($.evalJSON && cookieValue && cookieValue.match(/^\s*\{/)) {
103103
try {
104-
cookieValue = jQuery.evalJSON(cookieValue);
104+
cookieValue = $.evalJSON(cookieValue);
105105
}
106106
catch (e) {
107107
}

dom/styles/styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ steal('jquery', function( $ ) {
3838
oldName = name.replace(rdashAlpha, fcamelCase);
3939

4040
if ( rfloat.test(name) ) {
41-
name = jQuery.support.cssFloat ? "float" : "styleFloat";
41+
name = $.support.cssFloat ? "float" : "styleFloat";
4242
oldName = "cssFloat";
4343
}
4444

dom/within/within.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $.fn.within= function(left, top, useOffsetCache) {
3333

3434
// uses either the cached offset or .offset()
3535
var offset = useOffsetCache ?
36-
jQuery.data(this,"offsetCache") || jQuery.data(this,"offsetCache", q.offset()) :
36+
$.data(this,"offsetCache") || $.data(this,"offsetCache", q.offset()) :
3737
q.offset();
3838

3939
// Check if the given coordinates are within the area of the current element
@@ -46,7 +46,7 @@ $.fn.within= function(left, top, useOffsetCache) {
4646
}
4747
});
4848

49-
return this.pushStack( jQuery.unique( ret ), "within", left+","+top );
49+
return this.pushStack( $.unique( ret ), "within", left+","+top );
5050
}
5151

5252

@@ -75,8 +75,8 @@ $.fn.withinBox = function(left, top, width, height, useOffsetCache){
7575

7676
// use cached offset or .offset()
7777
var offset = useOffsetCache ?
78-
jQuery.data(this,"offset") ||
79-
jQuery.data(this,"offset", q.offset()) :
78+
$.data(this,"offset") ||
79+
$.data(this,"offset", q.offset()) :
8080
q.offset();
8181

8282

@@ -87,7 +87,7 @@ $.fn.withinBox = function(left, top, width, height, useOffsetCache){
8787
if(res)
8888
ret.push(this);
8989
});
90-
return this.pushStack( jQuery.unique( ret ), "withinBox", jQuery.makeArray(arguments).join(",") );
90+
return this.pushStack( $.unique( ret ), "withinBox", $.makeArray(arguments).join(",") );
9191
}
9292

9393
return $;

event/default/default.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ $event.trigger = function defaultTriggerer( event, data, elem, onlyHandlers){
8282
// Caller can pass in an Event, Object, or just an event type string
8383
event = typeof event === "object" ?
8484
// jQuery.Event object
85-
event[ jQuery.expando ] ? event :
85+
event[ $.expando ] ? event :
8686
// Object literal
87-
new jQuery.Event( type, event ) :
87+
new $.Event( type, event ) :
8888
// Just the event type (string)
89-
new jQuery.Event( type),
89+
new $.Event( type),
9090
res=oldTrigger.call($.event,event, data, elem, onlyHandlers),
9191
paused=event.isPaused && event.isPaused();
9292

event/destroyed/destroyed.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ steal('jquery', function( $ ) {
66
*/
77

88
// Store the old jQuery.cleanData
9-
var oldClean = jQuery.cleanData;
9+
var oldClean = $.cleanData;
1010

1111
// Overwrites cleanData which is called by jQuery on manipulation methods
1212
$.cleanData = function( elems ) {

event/drop/drop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ steal('jquery', 'jquery/event/drag', 'jquery/dom/within', 'jquery/dom/compare',
110110
* });
111111
*/
112112
$.Drop = function(callbacks, element){
113-
jQuery.extend(this,callbacks);
113+
$.extend(this,callbacks);
114114
this.element = $(element);
115115
}
116116
// add the elements ...

0 commit comments

Comments
 (0)