Comments (6)
What do you think on something like ?
Option1
snbbat(elements,{
position : [ -(this.$el.width() + INT_GAP), 0, 0 ],
easing : 'easeIn,
duration : 450,
}).({clearStyles:true})
Options2
snabbt(elements,{
position : [ -(this.$el.width() + INT_GAP), 0, 0 ],
easing : 'easeIn,
duration : 450,
callback: function(){snabbt(elements,{clearStyles:true}))
})
from snabbt.js.
@oak-tree What's wrong with element.removeAttribute('style')?
Create a shorthand or something:
// remove from single selector
function clearStyle(e){
e.removeAttribute('style');
}
// remove from multiple selectors
function multiClearStyles(e){
var i = 0, len = e.length;
for(i;i<len;i++){ e.removeAttribute('style'); }
}
...and just call clearStyle(element) on complete.
Would need a fix for jQuery like e[0] etc to get the raw element if using jQ.
from snabbt.js.
well. because some elements can have some presnabbit
styles. so maybe one wants to reset
only snabbt
styles
from snabbt.js.
@oak-tree As i said one could write a more complex func and add stuff like: elem.style.removeProperty('some-style-property');
.
You shouldn't have inline styles on your elements to begin with though so you should just remove the style all together.
from snabbt.js.
Since removing the styles is just a one-liner I don't see the need to wrap it within snabbt.
from snabbt.js.
just think on the case where other plugins add some property to the element. one may want to cancel only snabbt
properties.
from snabbt.js.
Related Issues (20)
- Allow adding extra transforms to output HOT 3
- Nice work. HOT 1
- Add sane examples HOT 4
- Moving to ES6
- allDone and complete is not fired with duration: 0 HOT 5
- simple error report HOT 2
- Snabbt and Hammer.js HOT 1
- npm does not install all required dependecies HOT 3
- Stop callback HOT 2
- cubic-bezier easing HOT 1
- Manual mode code snippet
- Opacity with delay
- Don't work on iphone4 safari and some Android browsers. HOT 2
- Issue with animations seemlingly affecting one another
- Duration is broken for manual mode?
- Error: Cannot find module './utils.js from snabbt.js'
- safari 8
- Change naming scheme? HOT 1
- Remove animation from element
- Attention animations not fire complete and allDone event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snabbt.js.