This is a migrated thread and some comments may be shown as answers.

[Solved] Client Side Selection / Content Population

0 Answers 78 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rion
Top achievements
Rank 1
Rion asked on 27 Aug 2010, 04:44 PM
I have been working on a "User Editor" that displays a window that contains a grid with three tabs. I have determined that all of my tab selection and the changing of my content may have to be handled client-side through jQuery. As the TabStrip itself is loaded into a div in the window through an Ajax call - and I then call a function that will Initialize the tabs inside of my window (as they were not previously accessible).

function Edit(username) {
                var window = $("#Window").data("tWindow");
                window.center();
                window.open();
                $("#WindowContent").load("Test/Edit", { userName: username },
                    function ()
                    {
                        InitializeTabs();
                    });
            }

I am wondering how I might accomplish this - or if I have overlooked something(s). I created a jQuery function that will determine when a click event has occurred on one of my tabs and for now it simply just displays an alert message ("Tab 1 Clicked"). However, would it be possible to implement the same functionality as the tab strip has through client side events.

unction InitializeTabs()
        {
            alert("Tabs Loaded");
             
            //First Tab has been clicked
            $(".t-link[href=#TabStrip-1]").click(
                function ()
                {
                    alert("Tab 1 Clicked");
                    //Insert code to select the first tab / Unselect other tabs
                    //Populate the content for tab 1
                });
 
             //Code for Tab 2 Click
 
             //Code for Tab 3 Click                                                           
         }

 I guess I am just stumped at how to accomplish this - or if I am missing something major - any advice would be greatly appreciated!

-Thanks

Rion
Tags
TabStrip
Asked by
Rion
Top achievements
Rank 1
Share this question
or