jquery - fragment - fade in and then fade out -


i want custom fragment animation, fade-right / fade-left in , fade-out after short delay. given fragments have class .visible , .current-fragment. thought delete class .visible after short delay , wanted result.

it doesn't. code-snippet doesn't remove class. reading through .js see adds .visible class every element.

// show fragments toarray( dom.wrapper.queryselectorall( slides_selector + ' .fragment' ) ).foreach( function( fragment ) {     fragment.classlist.add( 'visible' ); } ); 

here code-snippet o far:

if ($(".slash__input").hasclass("fade-left") || element.hasclass("fade-right") ) {      $("slash__input").removeclass("visible");      settimeout(function () {         console.log("working");         $('slash__input').removeclass("visible");     }, 5000);} 

thanks answer. maybe i'm down wrong path , should css?

found in reveal.js documentation :

multiple fragments can applied same element sequentially wrapping it, fade in text on first step , fade out on second.

<section> <span class="fragment fade-in">     <span class="fragment fade-out">i'll fade in, out</span> </span> 

be aware of data-fragment-index="",when building custom fragment animations.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -