Jquery: Setting permanent height to an specific tab & resize plugin
Posted
by
charlieCodex
on Stack Overflow
See other posts from Stack Overflow
or by charlieCodex
Published on 2012-07-06T03:13:14Z
Indexed on
2012/07/06
3:15 UTC
Read the original article
Hit count: 115
JavaScript
|jQuery
I am working with jquery sliding tabs. I have found a resize plugin that helps the tabs adjust to expanding content. The only thing is that i want to set a permanent height to tab 1(st_content_1). The code i have below works but it is a bit faulty.
- Should place in the function if statements?
- Check for the height of the first tab and then set it?
Or a any better solution?
You can check my EXAMPLE.
Jquery
$('.st_tab_view').resize(function() {
var height = 250
$('div#st_content_1').css('height', height+'px');
var $this = $(this);
$this.closest('.st_view').css('height', $this.height());
});
© Stack Overflow or respective owner