Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #511829

    My client wants the icon in the Icon Box in the same way that the Icon List animates when you scroll over it. What CSS would I need to achieve this?

    #512476

    Hey Andrea!

    Try setting this custom class to the icon box:

    avia_animate_when_almost_visible
    

    Cheers!
    Josue

    #512824

    Hi Josue,

    Where do I set that class? Is it in the CSS or do I have to rewrite a function or something?

    #512826

    Hey!

    Please turn on custom CSS field for ALB elements – http://kriesi.at/documentation/enfold/turn-on-custom-css-field-for-all-alb-elements/ and add new class into custom CSS field

    Cheers!
    Yigit

    #512833

    Cool tip Yigit, thanks for that.

    But I added that custom css class to the icon box elements, and nothing happened:

    http://newsite.curlyhost.com/mortgage-professionals/

    Is there something else I need to add?

    #513070

    No worries – I found a different solution for the client to just have them be images that poped up versus icons.

    #513073

    Hm, i don’t see any icon box on that page.

    Regards,
    Josue

    #517550

    Okay, so maybe there’s not a way to make each animate at a different time, but I’d like to make the animated numbers animate more slowly. I’m looking for where the CSS is that dictates how fast the numbers animate and can’t find anything… is it a function or something?

    #517844

    Hey!

    Open js/shortcodes.js and look for:

    window.requestAnimationFrame(function(){ start_count(element, countTo, increment, newCount, fakeCountTo) });
    

    Replace it by:

    setTimeout(function(){
    window.requestAnimationFrame(function(){ start_count(element, countTo, increment, newCount, fakeCountTo) });
    }, 300)
    

    Modify 300 as needed.

    Cheers!
    Josue

    #518152

    Thank you. That delays how long it takes to start to animating, and now I’m looking for each number to increment more slowly.

    Below the function I modified I see this function and I’m curious how I might edit the math there to have the numbers increment slower?

    		return this.each(function()
    		{
    			var number_container = $(this), elements = number_container.find('.avia-single-number'), countTimer = number_container.data('timer') || 3000;
    			
    			//prepare elements
    			elements.each(function(i)
    			{
    				var element = $(this), text = element.text();
    				if(window.addEventListener) element.text( text.replace(/./g, "0")); /*https://github.com/AviaThemes/wp-themes/issues/812*/
    			});
    			
    			//trigger number animation
    			number_container.addClass('number_prepared').on('avia_start_animation', function()
    			{
    				elements.each(function(i)
    				{
    					var element = $(this), countTo = element.data('number'), fakeCountTo = countTo, current = parseInt(element.text(),10), zeroOnly = /^0+$/.test(countTo), increment = 0;
    					
    					
    					//fallback for decimals like 00 or 000
    					if(zeroOnly && countTo !== 0) fakeCountTo = countTo.replace(/0/g, '9');
    					
    					increment = Math.round( fakeCountTo * 32 / countTimer);
    					if(increment == 0 || increment % 10 == 0) increment += 1;
    					
    					setTimeout(function(){ start_count(element, countTo, increment, current, fakeCountTo);}, 300);
    				});
    			});
    		});
    
    #518444

    Hey!

    Where are the Animated Numbers on the site? can you hand me an admin account?

    Best regards,
    Josue

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.