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

Changing cssClass name of UL

5 Answers 96 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
thomson
Top achievements
Rank 1
thomson asked on 04 Dec 2013, 02:36 PM
Hi ,
           I have only the root tab with few items , the tabs are generated from a datasource . the code generated is like this

<div id="ctl00__RadTabStrip1" class="RadTabStrip RadTabStrip_Suntab RadTabStripTop_Suntab ">
<div class="rtsLevel rtsLevel1">
<ul class="rtsUL"><li class="rtsLI rtsFirst"><a title="" class="rtsLink rtsSelected" href=""><span class="rtsOut"><span class="rtsIn"><span class="rtsTxt">Overview</span></span></span></a></li></ul>
</div>


I need to change the class name of ul from rtsUL to something else . How is this possible?

Thanks
Thomson

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Dec 2013, 07:16 AM
Hi thomson,

Please try the following code snippet to change the class name.

JavaScript:
<script src="../JS/jquery-1.10.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
    function pageLoad() {
        $(".rtsUL").attr('class', 'newClass');
    }
</script>

Thanks,
Shinu.
0
thomson
Top achievements
Rank 1
answered on 09 Dec 2013, 12:46 AM
Hi Shinu,
                I do want to avoid the delay made by Jquery. I was looking for any attributed like CssClass . I did try few also

Thanks
Thomson
0
Shinu
Top achievements
Rank 2
answered on 09 Dec 2013, 09:24 AM
Hi thomson,

I guess that you want to change the css of RadTabStrip from 'rtsUL' to one new CSS. Please have a look into the following code snippet.

ASPX:
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" DataFieldID="id" DataFieldParentID="parentid"
    DataTextField="text" DataSourceID="SqlDataSource1" CssClass="demo">
</telerik:RadTabStrip>

CSS:
<style type="text/css">
 .demo
 {
     border: 1px solid red !important;
     margin-left: 25px !important;
 }
</style>

Please elaborate your requirement if it doesn't help.
Thanks,
Shinu.
0
thomson
Top achievements
Rank 1
answered on 11 Dec 2013, 02:29 PM
i had tried the CssClass attribute on the Tabstrip , it applies on the div tab not on the ul
0
Kate
Telerik team
answered on 13 Dec 2013, 08:29 AM
Hello Thomson,

Can you clarify why you need to change the class name of the ul element in the RadTabStrip. Instead you can easily overwrite the needed css class selector by simply increasing its specificity as described here

Regards,
Kate
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TabStrip
Asked by
thomson
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
thomson
Top achievements
Rank 1
Kate
Telerik team
Share this question
or