Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. Using Jquery in DataList

Using Jquery in DataList

Scheduled Pinned Locked Moved JavaScript
helpjavascripttoolsquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mrkeivan
    wrote on last edited by
    #1

    Hey guys, I'm new to Jquery and I'm trying to use

    jCapSlide

    in a datalist,

                                    '<%# Eval("Category.cName")%>'
    

                                    '<%# Eval("pTitle") %>'
    
                                
    
                                    '<%# Eval("pTitle") %>'
    

    with this Function

    <script type="text/javascript">
    $(function () {
    $("#capslide_img_cont").capslide({
    caption_color: 'white',
    caption_bgcolor: 'black',
    overlay_bgcolor: 'black',
    border: '',
    showcaption: false
    });
    });
    </script>

    There are 3 records, this applies on the first one but not the other two, I think the problem is repeated

    id="capslide_img_cont"

    but can't seem to fix it. can you help me out ? It's deeply appreciated

    J G 2 Replies Last reply
    0
    • M mrkeivan

      Hey guys, I'm new to Jquery and I'm trying to use

      jCapSlide

      in a datalist,

                                      '<%# Eval("Category.cName")%>'
      

                                      '<%# Eval("pTitle") %>'
      
                                  
      
                                      '<%# Eval("pTitle") %>'
      

      with this Function

      <script type="text/javascript">
      $(function () {
      $("#capslide_img_cont").capslide({
      caption_color: 'white',
      caption_bgcolor: 'black',
      overlay_bgcolor: 'black',
      border: '',
      showcaption: false
      });
      });
      </script>

      There are 3 records, this applies on the first one but not the other two, I think the problem is repeated

      id="capslide_img_cont"

      but can't seem to fix it. can you help me out ? It's deeply appreciated

      J Offline
      J Offline
      jkirkerx
      wrote on last edited by
      #2

      try

      $('[id*="capslide_img_cont"]')

      it's a wildcard that accepts any prefix, and the suffix you enter. asp.net will inject a prefix like $content100 in front of your id name. so it becomes something like $content100_capside_img_cont As far as the 2nd and 3rd record goes, I'm not sure yet, not enough info

      1 Reply Last reply
      0
      • M mrkeivan

        Hey guys, I'm new to Jquery and I'm trying to use

        jCapSlide

        in a datalist,

                                        '<%# Eval("Category.cName")%>'
        

                                        '<%# Eval("pTitle") %>'
        
                                    
        
                                        '<%# Eval("pTitle") %>'
        

        with this Function

        <script type="text/javascript">
        $(function () {
        $("#capslide_img_cont").capslide({
        caption_color: 'white',
        caption_bgcolor: 'black',
        overlay_bgcolor: 'black',
        border: '',
        showcaption: false
        });
        });
        </script>

        There are 3 records, this applies on the first one but not the other two, I think the problem is repeated

        id="capslide_img_cont"

        but can't seem to fix it. can you help me out ? It's deeply appreciated

        G Offline
        G Offline
        gjllyl
        wrote on last edited by
        #3

        $("#capslide_img_cont") will get the first element.if you use 'Id' attribute,there will be not only one div with 'id' attribute.it's not good.so I suggest using 'name' attribute ,and then $("div[name='capslide_img_cont']").capslide.or using 'class' attribute if no one use 'ic_container' except this div.zhe code below:

        $(function () {
            $(".capslide\_img\_cont").capslide({
                caption\_color: 'white',
                caption\_bgcolor: 'black',
                overlay\_bgcolor: 'black',
                border: '',
                showcaption: false
            });
        });
            &lt;/script></pre></x-turndown>
        
        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups