0

Here is my code:

<section id="carousel" class="carousel slide" data-ride=carousel>
<ol class="carousel-indicators">
    <li data-target=#carousel data-slide-to=0 class=active></li>
    <li data-target=#carousel data-slide-to=1></li>
    <li data-target=#carousel data-slide-to=2></li>
</ol>
<div class="carousel-inner" role=listbox>
    <div class="item active">
        <img src="http://localhost/gst/media/sv.jpg" alt="First slide">
        <div class="carousel-caption">
            <h3>125 9684</h3>
            <p>awr gre</p>
        </div>
    </div>
    <div class=item>
        <img src="http://localhost/gst/media/gd.jpg" alt="Second slide">
        <div class="carousel-caption">
            <h3>125 9684</h3>
            <p>awr gre</p>
        </div>
    </div>
    <div class=item>
        <img src="http://localhost/gst/media/bj.jpg" alt="Third slide">
        <div class="carousel-caption">
            <h3>125 9684</h3>
            <p>awr gre</p>
        </div>
    </div>
</div>
<a class="left carousel-control" href=#carousel-example-generic 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=#carousel-example-generic role=button data-slide=next>
    <span class="glyphicon glyphicon-chevron-right" aria-hidden=true></span>
    <span class="sr-only">Next</span>
</a>

But I cannot see this carousel on the page. But page source shows it. It is working fine if only carousel code is on the page. After inserting code to display other items, they are showing, but carousel disapears.

David
  • 23
  • 1
  • 7

1 Answers1

0

You are missing the double quotations for data targets and data slides and also at many places. Recheck your code.

<ol class="carousel-indicators">
<li data-target="#carousel" data-slide-to="0" class="active"></li>
<li data-target="#carousel" data-slide-to="1"></li>
<li data-target="#carousel" data-slide-to="2"></li>

  • I've closing section tag. And no changes. – David Dec 29 '15 at 06:45
  • Just try doing it using a div tag as bootstrap uses div tag instead of section. –  Dec 29 '15 at 07:32
  • Then can you post your entire code or fiddle? Also make sure you are using the correct links for bootstrap or the correct path to the bootstrap folder in your code. –  Dec 30 '15 at 08:28
  • And I see that you are missing double quotes at many places like for span classes and aria hidden. Recheck your code completely. –  Dec 30 '15 at 08:47