Welcome, please login or register

Change animation of homepage images?

+1 vote
117 views
Hello, could you give me a code sample of how to change animation of homepage images?
 
Basically I don't like fade-in/out effect, I would prefer images to slide down and the whole animation to be speedup.
asked in Store Design by Jenny

1 Answer

0 votes
 
best answer
Jenny,
 
Sure, you can change the animation of home page images by rewriting the animation in custom JS section (SETTINGS -> Design -> Custom JS)
 
The home page images animation is a function called top_pics_carousel()
 
To slide images down and speedup the animation you could, for example do something like:
 
 
insert into custom JS:
$(document).ready(function() {

      clearTimeout(top_pics_tm);
      var top_pics_tm2 = setTimeout('top_pics_carousel()', 500);
});


function top_pics_carousel() {

	var top_pics_cnt = $('.top_pic_wrap').length;

	if (top_pics_cnt >= 2)
	{
		var cur_pic_wrap_id = $('.top_pic_wrap:visible').attr('id');
		var next_pic_wrap_id = $('#'+cur_pic_wrap_id).is(':last-child') ? $('.top_pic_wrap').first().attr('id') : $('#'+cur_pic_wrap_id).next().attr('id');
		$('#'+cur_pic_wrap_id).hide(300);
		$('#'+next_pic_wrap_id).slideDown(300);

		var top_pics_tm2 = setTimeout('top_pics_carousel()', 1600);
	}
}

 

Steve - eez.io support

 

answered by support (3,846 points)
Sell Online
Features
Pricing
Support
FAQ
Tutorials
Contact Us
Privacy
Terms
...