a gift back to the jQuery developers and community :)
rename it and use it as you please.
feel free to include this in the jQuery core; i think it's needed there.
what's also needed is a color animation for rgba(0,0,0,0.5) to rgba(255,255,255,1) for instance.
you forgot to include that :)
moderators of this forum,
- i'm not ungrateful
- i'm an opensource developer who uses a forum like this to feed back vital info to the developers of jQuery
- i'm not here to advertise my product, i simply want to enable you all to make an even better jQuery that keeps up with the times.
some other random things that could be improved in jQuery(ui) :
- a boxShadow and textShadow animation routine would be *great*.
- ever thought about color stops for color animations? from say blue to red to white, and back to red then blue? easy, efficient, auto-back-forward-back-etc animations? hint : you cache the calculation results :) i have that in my seductiveapps, but those in jQuery dev circles can probably do it in less lines of code than i can :)
- the animation routines and everything else that works on multiple elements, like .each(), need something easily recognizable that allows for processing of the next step (from an jQuery-user's developer's perspective) after *all* the elements that a function gets called for, are done. something like an 'allComplete' callback function for jQuery.animate(cssProps, settingsObject) in it's settingsObject.
seductiveapps.startup.stages[0] = {
userDevice : {
isPhone :
navigator.userAgent === 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1' // iPhone 8 and iPhone 8 Plus
|| navigator.userAgent === 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1' // iPhone 7 and iPhone 7 Plus
|| navigator.userAgent === 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36' // iPhoneX and iPhoneX Plus
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/Mobile Safari/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/PlayStation/i)
|| navigator.userAgent.match(/IEMobile/i)
|| navigator.userAgent.match(/Windows CE/i)
|| navigator.userAgent.match(/Windows Phone/i)
|| navigator.userAgent.match(/SymbianOS/i)
|| navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/PalmOS/i)
|| navigator.userAgent.match(/PalmSource/i)
|| navigator.userAgent.match(/SonyEricsson/i)
|| navigator.userAgent.match(/Opera Mini/i)
|| navigator.userAgent.match(/Vodafone/i)
|| navigator.userAgent.match(/DoCoMo/i)
|| navigator.userAgent.match(/AvantGo/i)
|| navigator.userAgent.match(/J-PHONE/i)
|| navigator.userAgent.match(/UP.Browser/i)
}
};
var
browserWidth = function () {
// desktop PC and Mac compatible
// iPhone 6 compatible - jQuery.width() is not (jQuery version 2.1.1)
// iPhone 8 and Android 8 compatible.
//return (window.innerWidth > 0) ? window.innerWidth : screen.width;
return (
seductiveapps.startup.stages[0].userDevice.isPhone
? window.top.outerWidth
? window.top.outerWidth
: (
window.top.document.documentElement
&& window.top.document.documentElement.clientHeight
? window.top.document.documentElement.clientHeight
: window.top.document.body.clientHeight
)
: window.top.innerWidth
? window.top.innerWidth
: (
window.top.document.documentElement
&& window.top.document.documentElement.clientHeight
? window.top.document.documentElement.clientHeight
: window.top.document.body.clientHeight
)
);
},
browserHeight = function () {
// desktop PC and Mac compatible
// iPhone 6 compatible - jQuery.width() is not (jQuery version 2.1.1)
// iPhone 8 and Android 8 compatible.
return (
seductiveapps.startup.stages[0].userDevice.isPhone
? window.top.outerHeight
? window.top.outerHeight
: (
window.top.document.documentElement
&& window.top.document.documentElement.clientHeight
? window.top.document.documentElement.clientHeight
: window.top.document.body.clientHeight
)
: window.top.innerHeight
? window.top.innerHeight
: (
window.top.document.documentElement
&& window.top.document.documentElement.clientHeight
? window.top.document.documentElement.clientHeight
: window.top.document.body.clientHeight
)
);
},
w = browserWidth(),
h = browserHeight(),
desktopOrientation = ( w < h ? 'portrait' : 'landscape' );