Slideshow in a html Table

A place for discussion about skinning and design. Before posting questions here you should review the documentation about creating skins.

This thread is closed to new posts. You must sign in to post in the forums.
3/9/2016 2:56:57 AM
Gravatar
Total Posts 1

Slideshow in a html Table

I have been trying to add a slideshow inside a table, I am very new, so quite clueless on how to do this. i used the slideshow on http://www.w3schools.com/bootstrap/bootstrap_carousel.asp and came up with this -

 

<html>

<head>

<title>Cnr</title>

<meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  <style>
  .carousel-inner > .item > img,
  .carousel-inner > .item > a > img {
      width: 50%;
      margin: auto;
  }
  </style>

table, th, td {
    border: 1px solid black;
    border-collapse: collapse;
}table, th, td {
    border: 1px solid black;
    border-collapse: collapse;
}table, th, td {
    border: 1px solid black;
    border-collapse: collapse;
}

</head>

 

<body>

<table style="background-color:lightgreen; width:100%" >

<tr>
<h3 style="font-size:200%> Catalogue</h3>

<div id="myCarousel" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
    <li data-target="#myCarousel" data-slide-to="1"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="Catalogue1.jpg" alt="Front Page">
    </div>

    <div class="item">
      <img src="Catalogue2.jpg" alt="Back Page">
    </div>

   
  </div>

  <!-- Left and right controls -->
  <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

<script>
$(document).ready(function(){
    // Activate Carousel
    $("#myCarousel").carousel("pause");

    // 1
    $("#myBtn").click(function(){
        $("#myCarousel").carousel(0);
    });

    // 2
    $("#myBtn2").click(function(){
        $("#myCarousel").carousel(1);
    });
    
    // Enable Carousel Indicators
    $(".item1").click(function(){
        $("#myCarousel").carousel(0);
    });
    $(".item2").click(function(){
   
    });
    
    // Enable Carousel Controls
    $(".left").click(function(){
        $("#myCarousel").carousel("prev");
    });
    $(".right").click(function(){
        $("#myCarousel").carousel("next");
    });
});
</script>

</tr>

</table>

</body>

</html>

 

The slideshow is viewing and moving, but I can't manually shift slides. Why is this and how do I fix this?

You must sign in to post in the forums. This thread is closed to new posts.