Click here to Skip to main content
       

ASP.NET

 
QuestionUsing Jquery in DataList Pinmembermrkeivan19-Sep-12 9:04 
Hey guys, I'm new to Jquery and I'm trying to use <pre>jCapSlide</pre> in a datalist,
 
<pre lang="HTML">
<asp:DataList ID="DataListList" runat="server" DataSourceID="ObjectDataSourceList"
                    RepeatColumns="5" CellPadding="5" CellSpacing="5"
                    OnItemDataBound="DataListList_ItemDataBound">
                    <ItemTemplate>
                        <div id="capslide_img_cont" class="ic_container">
                            <asp:Image ImageUrl='<%#Eval("Images.Image.Virtual_FileName") %>' ID="MainImage"
                                CssClass="NewsImage1" runat="server" />
                            <div class="overlay" style="display: none;">
                            </div>
                            <div class="ic_caption">
                                <p class="ic_category">
                                    '<%# Eval("Category.cName")%>'</p>
                                <h3>
                                    '<%# Eval("pTitle") %>'</h3>
                                <p class="ic_text">
                                    '<%# Eval("pTitle") %>'
                                </p>
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
</pre>
 
with this Function
 
<pre lang="Javascript">
&lt;script type="text/javascript">
    $(function () {
        $("#capslide_img_cont").capslide({
            caption_color: 'white',
            caption_bgcolor: 'black',
            overlay_bgcolor: 'black',
            border: '',
            showcaption: false
        });
    });
        &lt;/script>
</pre>
 
There are 3 records, this applies on the first one but not the other two,
I think the problem is repeated <pre>id="capslide_img_cont"</pre> but can't seem to fix it.
can you help me out ?
It's deeply appreciated

AnswerRe: Using Jquery in DataList Pinmember@AmitGajjar19-Sep-12 20:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 17 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid