i am using jquery-ui tabs to load 3 different views to user, however the problem is that user is not allowed to see all the 3 views all the time. so my question is how to dynamically remove tab if it doesn't contain any content. also another problem is that the tab height is not expanding to fit content.
php:
echo '<div id="tabs">';
echo '<ul><li><a href="#tabs-1">Author</a></li>';
echo '<li><a href="#tabs-2">Organizer</a></li>';
echo '<li><a href="#tabs-3">Reviewer</a></li></ul>';
while ($r = mysql_fetch_assoc($get_role)) {
$role = $r['role'];
if ($role == 'author') {
echo "<div id='tabs-1'>";
AuthorView($member_id, $conference_id, $start, $end, $today);
echo "</div>";
} else if ($role == 'organizer') {
echo "<div id='tabs-2'>";
OrganizerView($conference_id, $end);
echo "</div>";
} else if ($role == 'reviewer') {
echo "<div id='tabs-3'>";
ReviewerView($member_id, $conference_id, $start, $end, $today);
echo "</div>";
}
}
echo "</div>";
PS: AuthorView, ReviewerView, OrganizerView are php functions which creates each of the views