Tagged: enfold
-
AuthorPosts
-
September 30, 2015 at 9:23 pm #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?
October 1, 2015 at 11:23 pm #512476Hey Andrea!
Try setting this custom class to the icon box:
avia_animate_when_almost_visible
Cheers!
JosueOctober 2, 2015 at 2:28 pm #512824Hi Josue,
Where do I set that class? Is it in the CSS or do I have to rewrite a function or something?
October 2, 2015 at 2:29 pm #512826Hey!
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!
YigitOctober 2, 2015 at 2:33 pm #512833Cool 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?
October 2, 2015 at 11:22 pm #513070No worries – I found a different solution for the client to just have them be images that poped up versus icons.
October 2, 2015 at 11:49 pm #513073Hm, i don’t see any icon box on that page.
Regards,
JosueOctober 12, 2015 at 5:48 pm #517550Okay, 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?
October 13, 2015 at 6:12 am #517844Hey!
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!
JosueOctober 13, 2015 at 4:10 pm #518152Thank 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); }); }); });
October 14, 2015 at 12:11 am #518444Hey!
Where are the Animated Numbers on the site? can you hand me an admin account?
Best regards,
Josue -
AuthorPosts
- You must be logged in to reply to this topic.