The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Select a with the same id in div X as an in another div Y

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #33644


    I am trying to modify the “” to change images on click of each images thumbnails.

    I have set up the following framework

    So in Jquery when i select


    for the id of image thumbnail clicked I now want to select the corresponding image in #slideshow

      and display it.

      Please help on the jquery code to make this selection


      first of all it’s bad practice to reuse ID’s in multiple places on a page. switch the slideshow ones to classes and you’ve got:

      $('.slideshow .' + $(this).attr('id')).addClass('select')
      // or do whatever with it
    Viewing 2 posts - 1 through 2 (of 2 total)
    • The forum ‘JavaScript’ is closed to new topics and replies.