jquery slider with datalist

imazyEmarytit

New Member
i want to make jquery slider with datalist, every thing work fine except when i select item then select other one, the old item still selected & cannot be re-select again.here is my code: \[code\]<%--following code for navigation tab in home page--%><%--http://webdeveloperplus.com/jquery/featured-content-slider-using-jquery-ui/--%><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" ></script><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.3/jquery-ui.min.js" ></script><script type="text/javascript"> $(document).ready(function () {// $("#featured > ul").tabs({ fx: { opacity: "toggle"} }).tabs("rotate", 5000, true); $("#featured > ul").tabs({ fx: { opacity: "toggle"} }); });</script><div class="wrapOverall"> <div id="featured"> <ul class="ui-tabs-nav"> <asp:DataList ID="dlstUiTabNav" runat="server" DataKeyField="ArticleID" DataSourceID="odsUiTabNav"> <ItemTemplate> <li id="nav-fragment-<%# Eval("ArticleID") %>" class="<%# SetLiClass(DataBinder.Eval(Container, "ItemIndex"),DataBinder.Eval(Container, "ItemType")) %>"> <a href="http://stackoverflow.com/questions/12734510/#fragment-<%# Eval("ArticleID") %>"><span>'<%# Eval("ArticleTitle") %>'</span></a></li> </ItemTemplate> </asp:DataList> </ul> <!-- Content --> <asp:DataList ID="dlstContent" runat="server" DataKeyField="ArticleID" DataSourceID="odsUiTabNav"> <ItemTemplate> <div id="fragment-<%# Eval("ArticleID") %>" class="<%# SetUiTabClass(DataBinder.Eval(Container, "ItemIndex"),DataBinder.Eval(Container, "ItemType")) %>" style=""> <telerik:RadBinaryImage ID="RadBinaryImage1" runat="server" CropPosition="Center" DataValue='http://stackoverflow.com/questions/12734510/<%# Eval("Image") %>'/> <div class="info"> <h2> <asp:HyperLink ID="hlnkTitle" runat="server" NavigateUrl='<%# "~\Article.aspx?ArticleID=" & Eval("ArticleID") %>' Text='<%# Eval("ArticleTitle") %>'> </asp:HyperLink> </h2> <p> <asp:HyperLink ID="hlnkMore" runat="server" NavigateUrl='<%# "~\Article.aspx?ArticleID=" & Eval("ArticleID") %>' Text='<%# Eval("ArticleContentSummary")%>'></asp:HyperLink> </p> </div> </div> </ItemTemplate> </asp:DataList> </div></div><asp:ObjectDataSource ID="odsUiTabNav" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="dsArticlesTableAdapters.uspHomePageContentSelectTableAdapter"> <SelectParameters> <asp:SessionParameter Name="Culture" SessionField="MyCult" Type="String" /> </SelectParameters></asp:ObjectDataSource>\[/code\]code behind: \[code\]Public Function SetLiClass(ByVal ItemIndex As Integer, ByVal ListItemType As ListItemType) As String Dim str As String If ListItemType = ListItemType.Item Or _ ListItemType = ListItemType.AlternatingItem Then If ItemIndex = 0 Then str = "ui-tabs-nav-item ui-tabs-selected" Else str = "ui-tabs-nav-item" End If Else str = "" End If Return strEnd FunctionPublic Function SetUiTabClass(ByVal ItemIndex As Integer, ByVal ListItemType As ListItemType) As String Dim str As String If ListItemType = ListItemType.Item Or ListItemType.AlternatingItem Then If ItemIndex = 0 Then str = "ui-tabs-panel" Else str = "ui-tabs-panel ui-tabs-hide" End If Else str = "" End If Return strEnd Function\[/code\]hope someone can help, Thanks in advance :)
 
Back
Top