Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Uses Adaptive.$ over Mobify.$ if it is defined #17

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/bellows.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions src/bellows.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
var Mobify = window.Mobify = window.Mobify || {};
Mobify.$ = Mobify.$ || window.Zepto || window.jQuery;
var Adaptive = window.Adaptive || {};
if (Adaptive.$ === undefined) {
Mobify.$ = Mobify.$ || window.Zepto || window.jQuery;
}
Mobify.UI = Mobify.UI || {};

(function($, document) {
Expand All @@ -9,7 +12,7 @@ Mobify.UI = Mobify.UI || {};
'touch': 'ontouchend' in document
});

})(Mobify.$, document);
})(Adaptive.$ || Mobify.$, document);


/**
Expand Down Expand Up @@ -64,12 +67,13 @@ Mobify.UI.Utils = (function($) {
}

var el = document.createElement('fakeelement');
// Samsung Galaxy S3 (v.4.3) requires WebkitTransition as the first option or else it grabs transition property that doesn't really work
var transitions = {
'WebkitTransition':'webkitTransitionEnd',
'transition':'transitionEnd transitionend',
'OTransition':'oTransitionEnd',
'MSTransition':'msTransitionEnd',
'MozTransition':'transitionend',
'WebkitTransition':'webkitTransitionEnd'
'MozTransition':'transitionend'
};

var t;
Expand All @@ -87,7 +91,7 @@ Mobify.UI.Utils = (function($) {

return exports;

})(Mobify.$);
})(Adaptive.$ || Mobify.$);


/*
Expand Down Expand Up @@ -292,7 +296,7 @@ Mobify.UI.Bellows = (function($, Utils) {

return Bellows;

})(Mobify.$, Mobify.UI.Utils);
})(Adaptive.$ || Mobify.$, Mobify.UI.Utils);

(function($) {
$.fn.bellows = function(options) {
Expand All @@ -307,4 +311,4 @@ Mobify.UI.Bellows = (function($, Utils) {
this.bellows = bellows; // Provide the bellows object to callers
});
};
})(Mobify.$);
})(Adaptive.$ || Mobify.$);