rotate_words and max_step

  • Posted in : Photographer
  • ilkerdogan
    Participant

    Hello,

    I’m using the below code for the photowall, I want to have max_step for the rotate_words. I want it stop after the one turn. The last sentence should be “ve fotoğrafınız ilkerdogan.com’da”. Could you pls advice?

    I tried max_step, but it didn’t worked.

    [photo_wall animation=”random” interval=”1600″ max_step=”3″ ]

    [intro]Sıra Sizde, Gülümseyin!!!
    [rotate_words interval=”1200″ titles=”. . . . 3 . . . .,. . . . 2 . . . .,. . . . 1 . . . ., Çekiyorum…, ve fotoğrafınız ilkerdogan.com’da”][/intro]

    ahmetsali
    Keymaster

    Hi, sorry it is not available by default.

    ilkerdogan
    Participant

    Hello,

    Do i have any way to do it? I search on internet and i couldn’t find any important information.

    Br

    ahmetsali
    Keymaster

    Hi again, you need to edit js/main.js file in theme folder in a text editor and find line : 326, you will see;

    // ------------------------------
    // Rotating Words
    var rotate_words = $('.rotate-words'),
    	interval = 3000;
    if(rotate_words.length) {
    	
    	var next_word_index = 0;
    	interval = parseInt(rotate_words.data("interval"));
    	
    	if(Modernizr.csstransforms3d) {
    	
    		rotate_words.each(function(index, element) {
    			$(element).find('span').eq(0).addClass('active');
    			setInterval(function(){
    				next_word_index = $(element).find('.active').next().length ? $(element).find('.active').next().index() : 0;
    				$(element).find('.active').addClass('rotate-out').removeClass('rotate-in active');
    				$(element).find('span').eq(next_word_index).addClass('rotate-in active').removeClass('rotate-out');
    			},interval);
    		});
    
    	}
    	else {
    		
    		rotate_words.each(function(index, element) {
    			$(element).find('span').eq(0).addClass('active').show();
    			setInterval(function(){
    				next_word_index = $(element).find('.active').next().length ? $(element).find('.active').next().index() : 0;
    				$(element).find('.active').removeClass('active').slideUp(500);
    				$(element).find('span').eq(next_word_index).addClass('active').slideDown(500);
    			},interval);
    		});
    	}
    }
    // ------------------------------
    
    

    and replace with this;

    // ------------------------------
    // Rotating Words
    var rotate_words = $('.rotate-words'),
    	interval = 3000;
    if(rotate_words.length) {
    	
    	var next_word_index = 0;
    	interval = parseInt(rotate_words.data("interval"));
    	
    	if(Modernizr.csstransforms3d) {
    	
    		rotate_words.each(function(index, element) {
    			$(element).find('span').eq(0).addClass('active');
    			setInterval(function(){
    				next_word_index = $(element).find('.active').next().index();
    				$(element).find('.active').addClass('rotate-out').removeClass('rotate-in active');
    				$(element).find('span').eq(next_word_index).addClass('rotate-in active').removeClass('rotate-out');
    			},interval);
    		});
    
    	}
    	else {
    		
    		rotate_words.each(function(index, element) {
    			$(element).find('span').eq(0).addClass('active').show();
    			setInterval(function(){
    				next_word_index = $(element).find('.active').next().index();
    				$(element).find('.active').removeClass('active').slideUp(500);
    				$(element).find('span').eq(next_word_index).addClass('active').slideDown(500);
    			},interval);
    		});
    	}
    }
    // ------------------------------
    
    ilkerdogan
    Participant

    Thank you Ahmet,

    I’ll try now.

    ilkerdogan
    Participant

    It works,

    Thank you so much!

    ahmetsali
    Keymaster

    you are welcome, please don’t forget to rate the theme on themeforest if you liked it :)

    psouvik
    Participant

    Hi Serken/Mehmet

    Is it possible to increase the time of the rotating texts individually? Is the above code that you mentioned does this?

    For example, what I want to do is, when the first sentence says “I’m a photographer”, I want it to keep showing photographer until the second rotating text below shows everything eg. beauty, happiness, etc. And then the the word “photographer” on the first sentence changes to “Writer” and waits until the second sentences finishes rotating it’s own specific words relating to writing.

    http://www.bruisedpassport.com

    Thanks
    Souvik

    serkan
    Moderator

    Hi Souvik,
    You can increase the interval time via admin panel.
    Please go to Appearance > Theme options > Homepage > Photos Change Interval (play with this number)
    Thanks

    psouvik
    Participant

    Hi Serken

    I am not talking about the photos on the photowall. I’m talking about the text on the photowall.

    I want to hold on the first word on the first sentence (for example “photographer”) until the second sentence has rotated all words relating to photographer. Once this is done, then the first sentence would rotate the word “photographer” to “adventurer”.

    Kind regards,
    Souvik

    serkan
    Moderator

    Hi Souvik,
    Appearance > Editor > function.php > rotate words interval time is coming from here and you can not set for each rotate words time. You are able to change all of them. So it is not possible by default.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register