JavaScript + CSS3 animations not working properly? -


i programming library called quickly.js. there conceal(milliseconds) , display() functions, have animations programmed through css. conceal function animation working correctly, display function animation not work correctly. not fade in. instead, abruptly appears. here jsfiddle demonstrating bug: https://jsfiddle.net/v6esmqtf/6/.

you didn't have display function set up.

element.prototype.conceal = function(ms) {   ms = ms || 0;   var thisstyle = this.style;   thisstyle.opacity = 0;   settimeout(function() {     thisstyle.display = "none";   }, ms); };  element.prototype.display = function(ms) {   ms = ms || 0;   var thisstyle = this.style;   thisstyle.display = "";   settimeout(function() {     thisstyle.opacity = 1;   }, ms); }; 

and then...

document.getelementbyid("conceal").onclick = function() {   document.getelementbyid("get").conceal(800); };  document.getelementbyid("display").onclick = function() {   document.getelementbyid("get").display(0); }; 

hope helps.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -