-
Notifications
You must be signed in to change notification settings - Fork 110
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
base: master
Are you sure you want to change the base?
Conversation
build/js/material-refresh.js
Outdated
// 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; |
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remade all selectors.
build/js/material-refresh.js
Outdated
if($(refreshNav).offset()){ | ||
customNavTop = $(refreshNav).offset().top; | ||
refreshMain.classList.add('mui-refresh-nav'); | ||
basePosY = parseIntPx(refreshNav.style.height) + 20; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally.
No description provided.