Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table>
- <tr>
- <td id="3">
- <a href="#" class="thumb">
- <img class="thumbimg" src="images/image1.png" alt="image1.png" />
- </a>
- </td>
- </tr>
- </table>
- <script type="text/javascript">
- $('.thumbimg').click(function () {
- imgID = $(this).closest('td').attr('id');
- var newSrc = imgPath + $(this).attr('alt');
- mainImage.attr('src', newSrc);
- $('#gallery').attr('width', mainImage.attr('width') + '15px');
- });
- </script>
Add Comment
Please, Sign In to add comment