Blog for web designers

Refresh function with setimeout in jquery

With jquery you can refresh function with setimeout.

In my previous project I had face a problem with a flex slider relating height. The issue was with the slider having thumbnail and sliding image both. Not every sliding images height were same so there was a space between sliding image and thumbnail in some cases. Now my clients ask me to have a extensible height of that slider. Means the height should update every time and it should fit without having a gap.

First I tried to refresh function with setimeout in jquery for thumbnails. Then I called the function to start on browser load.

function refresh_height_in_three_sec(){
		var getHeight = $(".flex-active-slide img").height();
		setTimeout(refresh_height_in_one_sec, 3000);

	$("body").on('click', '.flex-control-thumbs', function(event) {

Santosh Shah

My name is Santosh Shah and blogs at

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.