Comments (6)
Unless I'm misunderstanding, this has existed since the original release:
avoidTransforms: (Boolean)
By default the plugin will convert left and top animations to the CSS3 style -webkit-transform (or equivalent) to aid hardware acceleration. This functionality can be disabled by setting this to true.
Using the above property will simply bypass the plugin and pass it back to the default jquery animate method.
from jquery-animate-enhanced.
I thought that using "avoidTransforms" is only relevant for the position and size transistion; in this case it will not animate the "transform" property but "left", "top","width" or "height" instead. What I need is to turn off all transition for certain animate invocations, e.g. for changing the opacity.
from jquery-animate-enhanced.
Ah I see, yes you're right that setting only affects position/size animations.
Ok this shouldn't be a big deal to add in. Literally just a property that will bypass the entire plugin. 'avoidCSSTransitions' works for me.
I'll keep you posted.
from jquery-animate-enhanced.
Just a thought: in my projects I have a lot of jquery plugins that also use animate(). I'm looking for a way to configure from outside whether they should use css transistions or the normal jquery.animate() so that I don't have to adapt all the scripts.
I'm thinking of a kind of live selector that may be passed to jquery-animate-enhanced to turn off the enhancement, e.g.
jQuery.fn.animate.defaults.avoidCSSTransitions=$(".no-transition")
so I could easily configure the behaviour within the HTML/CSS file by just adding the class. One could also have a "white" list selector in case only specific nodes' animation should be enhanced, and all others should just revert to the default animate call. This kind of control over the usage of css transitions would be really cool as the page designer would just have to set the classes for the affected nodes.
from jquery-animate-enhanced.
Any news on this new "avoidCSSTransitions" property?
from jquery-animate-enhanced.
Just been added, sorry for the delay on this!
Simply set to true:
$('.target').animate({left: "-=200px", avoidCSSTransitions:false}, 1000);
from jquery-animate-enhanced.
Related Issues (20)
- animating right prop from negative to 0 not properly handle HOT 4
- Support for IE9+? HOT 1
- Fails to use percentage values correctly, interpreting it as pixels instead
- fadeIn() breaks initial opacity value
- jquery easing HOT 1
- animate(pos, options) doesn't seem to be supported HOT 1
- slidetoggle doesn't use css HOT 2
- [enhancement] Add missing bower.json. HOT 1
- Uncaught TypeError: Cannot read property 'tagName' of undefined HOT 1
- Safari 5.1.7 on Windows no acceleration
- box-shadow
- Trying to animate top/left without modifying the offset moves the offset to zero HOT 5
- Please use git tags for bower clients HOT 3
- Issue with Left 0 HOT 6
- :animate filter does not work as native one
- Bower install issue HOT 2
- Link Broken HOT 1
- Doesn't seem to work well with jquery.ui datepicker
- fadeIn/fadeOut/animate with opacity doesn't work on Chromium for Android
- fadeIn wipes transform translate3D on element (breaks swipebox)
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 jquery-animate-enhanced.