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

Remove jQuery and Zepto dependencies #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

blvz
Copy link

@blvz blvz commented May 13, 2015

No description provided.

// Main function to init the refresh style
function mRefresh(options) {
options = options || {};

scrollEl = options.scrollEl ? options.scrollEl :
isIOS ? scrollEl : document;
$scrollEl = $(scrollEl);

// extend options
onBegin = options.onBegin;
onEnd = options.onEnd;
maxRotateTime = options.maxTime || maxRotateTime;
refreshNav = options.nav || refreshNav;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoud you use refreshNav = document.querySelector(options.nav) || refreshNav; here? (Or create query selector below?)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remade all selectors.

if($(refreshNav).offset()){
customNavTop = $(refreshNav).offset().top;
refreshMain.classList.add('mui-refresh-nav');
basePosY = parseIntPx(refreshNav.style.height) + 20;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basePosY = parseIntPx(refreshNav.clientHeight) + 20; might be better?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants