tags:

views:

39

answers:

1

Considering the example format by the author of jqGrid [ http://trirand.com/jqgrid/jqgrid.html ] how would I include a link from within the tab [ #RightPane ] to append to the tabs atop? And, have the new tab display AJAX content?

A: 

This should get you started:

<script type="text/javascript">
        $(function() {

        //this sets up the tabs
         $("#theTabs").tabs();

//this attaches the new tab functionallity to the link
            $("#AddTabLink").click(function() {
                $("#theTabs").tabs("add", "the url you want to load ajaxly", "The New Tab title");
            }
            );

        });
    </script>


and this is the link that will have the addtab functionality applied to it. this could go on an existing tab,  or somewhere else on the page.

<a href="#" id="AddTabLink">Click Here</a>
Patricia