Resize Div after append

Hi,

I’m using an on click event to append some html inside a tab and then i want to resize the tab after the append. If i click one of the tabs the content gets appended but the resize doesnt happen. If i then click the tab again the resize happens. What am i doing wrong here as i need the resize to happen on the first tab click after the append?

Thanks!


$('.tabs dd').on('click', function() {
	var clickedTab = $(this).attr('id').split(' ')[1];
				
	var tabContent = catalogueProductObject[1]['tabsText'][clickedTab]['post_content'];
			
	// append the tab html and then resize the div container
	$('.' + clickedTab).find('.tabContent').append(tabContent);
	$('.' + clickedTab).find('.tabContent').resize();
				
				
});

By the code you provided, I’m going to guess that the div ID has a space in it. If it does, it won’t work. ID/name should be no spaces and begin with either a letter or underscore; it cannot begin with a number or character.

V/r,

:slight_smile: