tabTrigger not working in jQuery Tabs

tabTrigger not working in jQuery Tabs

Hi...
i am stuck with a problem of tabtrigger in jquery tabs. When i enter a numeric i get that tab active when the page loads, but when i used a variable to trigger the active tab, that value is not taken. #tabTrigger is a hidden input where i pass value based on the user action.....

Please help...

$(function() {
   var activeTab = $('#tabTrigger').val();
   $('#container-1').tabs(activeTab);
   $('#container-1').triggerTab(activeTab);

//$('#container-1').triggerTab(2); when using this method the second tab gets active.
});