Hello,

I like Metropolis very much. Nice theme ...

I want to hide the mission statement after two slides using following code in jquery.cycle.all.min.js

jQuery(document).ready(function($) {
    $('.slideshow').cycle({
		fx: 'uncover' , timeout: 16000, delay: -15000, speedOut: 2500, after: onAfter });
});
 
function onAfter(curr, next, opts) {

    var index = opts.currSlide;
    $('.mission')[index > 2 ? 'hide' : 'show']();
}

As soon as I add the parameter "after: onAfter" the slideshow won't start anymore.

Any idea?

Thank.
Michael

Comments

lavisrap’s picture

Status: Active » Fixed

I found the problem. It was not in the cycle plugin. It works fine with following code in jquery.cycle.all.min.js

	var Zaehler = 0;
	Texte = new Array( "MISSION1", "MISSION2", "MISSION3", "MISSION4", "MISSION5" );
								 
	function changemission() {

		$('.mission .content p' ).fadeOut(300,function() {$('.mission .content p' ).html(Texte[Zaehler]);} ).fadeIn(700);
		Zaehler ++;
		if( Zaehler > Texte.length ) Zaehler = 0;
	}
    
	$('.slideshow').cycle({
		fx: 'uncover' , timeout: 15000, delay: -12000, speed:3000 , after:changemission });
lavisrap’s picture

Status: Fixed » Closed (fixed)