On Nov 15, 4:03 pm, ccieszyn <[EMAIL PROTECTED]> wrote:
> Hi, I'm using the following javascript to to run a fade/slide/close-
> able UI box with UI tabs:
>
> <pre>
> <script type="text/javascript">
> $(function() {
> $('#navcontainer ul').tabs({ unselect: true,
> fxSlide: true, fxFade: true, fxSpeed: 'medium' });
> });
> </script>
> </pre>
>
> I would like to add another line that I could attach to a separate
> button in the UI box itself that would close the currently selected
> tab when clicked. Can anyone show me the way?
>
> Thanks!
Try:
$(function() {
var $tabs = $('#navcontainer ul').tabs({ unselect: true, fxSlide:
true, fxFade: true, fxSpeed: 'medium' });
$('#your-button').bind('click', function() {
$tabs.tabsClick( $tabs.tabsSelected() );
return false;
});
});
--Klaus