Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing jQuery references to local $ #71

Merged
merged 1 commit into from Feb 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dom/animate/animate.js
Expand Up @@ -212,7 +212,7 @@ steal('jquery', 'jquery/dom/styles', function ($) {
return oldanimate.apply(this, arguments);
}

var optall = jQuery.speed(speed, easing, callback);
var optall = $.speed(speed, easing, callback);

// Add everything to the animation queue
this.queue(optall.queue, function(done) {
Expand Down
218 changes: 109 additions & 109 deletions dom/animate/animate_test.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dom/closest/closest.js
Expand Up @@ -11,8 +11,8 @@ steal('jquery', function($) {
*
* ">li click" : function( el, ev ) { ... }
*/
var oldClosest = jQuery.fn.closest;
jQuery.fn.closest = function(selectors, context){
var oldClosest = $.fn.closest;
$.fn.closest = function(selectors, context){
var rooted = {}, res, result, thing, i, j, selector, rootedIsEmpty = true, selector, selectorsArr = selectors;
if(typeof selectors == "string") selectorsArr = [selectors];

Expand Down
2 changes: 1 addition & 1 deletion dom/compare/compare.js
Expand Up @@ -24,7 +24,7 @@ steal('jquery', function($) {
*/

// See http://ejohn.org/blog/comparing-document-position/
jQuery.fn.compare = function(element){ //usually
$.fn.compare = function(element){ //usually
try{
// Firefox 3 throws an error with XUL - we can't use compare then
element = element.jquery ? element[0] : element;
Expand Down
12 changes: 6 additions & 6 deletions dom/cookie/cookie.js
Expand Up @@ -49,7 +49,7 @@ steal('jquery', 'jquery/lang/json', function($) {
*
* @return {String} the value of the cookie or {undefined} when setting the cookie.
*/
jQuery.cookie = function(name, value, options) {
$.cookie = function(name, value, options) {
if (typeof value != 'undefined') {
// name and value given, set cookie
options = options ||
Expand All @@ -59,8 +59,8 @@ steal('jquery', 'jquery/lang/json', function($) {
options.expires = -1;
}
// convert value to JSON string
if (typeof value == 'object' && jQuery.toJSON) {
value = jQuery.toJSON(value);
if (typeof value == 'object' && $.toJSON) {
value = $.toJSON(value);
}
var expires = '';
// Set expiry
Expand Down Expand Up @@ -89,7 +89,7 @@ steal('jquery', 'jquery/lang/json', function($) {
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
var cookie = $.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
// Get the cookie value
Expand All @@ -99,9 +99,9 @@ steal('jquery', 'jquery/lang/json', function($) {
}
}
// Parse JSON from the cookie into an object
if (jQuery.evalJSON && cookieValue && cookieValue.match(/^\s*\{/)) {
if ($.evalJSON && cookieValue && cookieValue.match(/^\s*\{/)) {
try {
cookieValue = jQuery.evalJSON(cookieValue);
cookieValue = $.evalJSON(cookieValue);
}
catch (e) {
}
Expand Down
2 changes: 1 addition & 1 deletion dom/styles/styles.js
Expand Up @@ -38,7 +38,7 @@ steal('jquery', function( $ ) {
oldName = name.replace(rdashAlpha, fcamelCase);

if ( rfloat.test(name) ) {
name = jQuery.support.cssFloat ? "float" : "styleFloat";
name = $.support.cssFloat ? "float" : "styleFloat";
oldName = "cssFloat";
}

Expand Down
10 changes: 5 additions & 5 deletions dom/within/within.js
Expand Up @@ -33,7 +33,7 @@ $.fn.within= function(left, top, useOffsetCache) {

// uses either the cached offset or .offset()
var offset = useOffsetCache ?
jQuery.data(this,"offsetCache") || jQuery.data(this,"offsetCache", q.offset()) :
$.data(this,"offsetCache") || $.data(this,"offsetCache", q.offset()) :
q.offset();

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

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


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

// use cached offset or .offset()
var offset = useOffsetCache ?
jQuery.data(this,"offset") ||
jQuery.data(this,"offset", q.offset()) :
$.data(this,"offset") ||
$.data(this,"offset", q.offset()) :
q.offset();


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

return $;
Expand Down
6 changes: 3 additions & 3 deletions event/default/default.js
Expand Up @@ -82,11 +82,11 @@ $event.trigger = function defaultTriggerer( event, data, elem, onlyHandlers){
// Caller can pass in an Event, Object, or just an event type string
event = typeof event === "object" ?
// jQuery.Event object
event[ jQuery.expando ] ? event :
event[ $.expando ] ? event :
// Object literal
new jQuery.Event( type, event ) :
new $.Event( type, event ) :
// Just the event type (string)
new jQuery.Event( type),
new $.Event( type),
res=oldTrigger.call($.event,event, data, elem, onlyHandlers),
paused=event.isPaused && event.isPaused();

Expand Down
2 changes: 1 addition & 1 deletion event/destroyed/destroyed.js
Expand Up @@ -6,7 +6,7 @@ steal('jquery', function( $ ) {
*/

// Store the old jQuery.cleanData
var oldClean = jQuery.cleanData;
var oldClean = $.cleanData;

// Overwrites cleanData which is called by jQuery on manipulation methods
$.cleanData = function( elems ) {
Expand Down
2 changes: 1 addition & 1 deletion event/drop/drop.js
Expand Up @@ -110,7 +110,7 @@ steal('jquery', 'jquery/event/drag', 'jquery/dom/within', 'jquery/dom/compare',
* });
*/
$.Drop = function(callbacks, element){
jQuery.extend(this,callbacks);
$.extend(this,callbacks);
this.element = $(element);
}
// add the elements ...
Expand Down
10 changes: 5 additions & 5 deletions event/fastfix/fastfix.js
Expand Up @@ -61,10 +61,10 @@ steal('jquery', function ($) {
};

// Get all properties that should be mapped
jQuery.each(jQuery.event.keyHooks.props.concat(jQuery.event.mouseHooks.props).concat(jQuery.event.props), function (i, prop) {
$.each($.event.keyHooks.props.concat($.event.mouseHooks.props).concat($.event.props), function (i, prop) {
if (prop !== "target") {
(function () {
Object.defineProperty(jQuery.Event.prototype, prop, {
Object.defineProperty($.Event.prototype, prop, {
get : function () {
// get the original value, undefined when there is no original event
var originalValue = this.originalEvent && this.originalEvent[prop];
Expand All @@ -86,13 +86,13 @@ steal('jquery', function ($) {
}
});

jQuery.event.fix = function (event) {
if (event[ jQuery.expando ]) {
$.event.fix = function (event) {
if (event[ $.expando ]) {
return event;
}
// Create a jQuery event with at minimum a target and type set
var originalEvent = event,
event = jQuery.Event(originalEvent);
event = $.Event(originalEvent);
event.target = originalEvent.target;
// Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
if (!event.target) {
Expand Down