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

Is it possibe to apply javascript to the tab images specified via ImageURL and HoveredImageUrl

5 Answers 35 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Paul Squance
Top achievements
Rank 1
Paul Squance asked on 09 Mar 2010, 03:59 PM
I know the template is available

5 Answers, 1 is accepted

Sort by
0
Accepted
Yana
Telerik team
answered on 12 Mar 2010, 09:44 AM
Hi Paul Squance,

The other option is to use jquery to subscribe to click event of the images like this:

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ss" runat="server" />
    <div>
        <telerik:RadTabStrip ID="tabStrip1" runat="server">
            <Tabs>
                <telerik:RadTab Text="tab 1" ImageUrl="images/1.gif" />
                <telerik:RadTab Text="tab 2" ImageUrl="images/2.gif" />
            </Tabs>
        </telerik:RadTabStrip>
    </div>
    </form>
    <script type="text/javascript">
 
        function pageLoad() {
            var $ = $telerik.$;
 
            $('.rtsImg').click(function() {
                alert("You clicked image for " + this.nextSibling.innerHTML);
            });
        }
    </script>
</body>
</html>

Please try this and let us know how it goes.

All the best,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Paul Squance
Top achievements
Rank 1
answered on 17 Mar 2010, 11:45 AM
Yana,

That's perfect.

Thanks,

Paul
0
Paul Squance
Top achievements
Rank 1
answered on 24 Mar 2010, 03:38 PM
The solution Yana gave I think involves static client library.  I can't see the click function listsed in the documentation for this functionality.  Is there a more expansive function list that is not published?

I need to be able to identify if the tab clicked is the first tab and not fire a specified function in this case.
0
Paul Squance
Top achievements
Rank 1
answered on 24 Mar 2010, 04:33 PM
Please ignore the last paragraph the last post - I'm not concentrating!  But it would be good to know about any additional functionality
0
Yana
Telerik team
answered on 25 Mar 2010, 01:50 PM
Hi Paul Squance,

Actually it's the jquery library which is included in our scripts. Please check this blog post for more information.

Best regards,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TabStrip
Asked by
Paul Squance
Top achievements
Rank 1
Answers by
Yana
Telerik team
Paul Squance
Top achievements
Rank 1
Share this question
or