Joe
Joe

Reputation: 1

how to display all carousel picture on codeigniter

my website has connected to internet network, but i have a problem to my picture on that carousel. that carousel only display one picture (and that picture always automated change the size, from small to bigger). I want to display all picture on my carousel. how to fix it ? and this is my code

                                <!-- BEGIN .om-slide-1 -->
                                <?php foreach($keyslide as $kim){?>
                                <div class="om-slide om-slide-2 isactive">
                                    <div class="om-layer om-layer-1" data-animation-in="fadeIn" data-animation-out="fadeOut" data-delay="0"  data-delayout="300" style="top: 0px; left: 0px; width: 100%;">
                                        <img src="<?php echo base_url();?>assets/uploads/produk/1e5d3-cupgentong.jpg">/<?php echo $kim->img;?>&w=500&h=400" alt="<?php echo $kim->judul;?>" />

                                    </div>
                                    <div class="om-layer om-layer-2" data-animation-in="fadeIn" data-animation-out="fadeOut" data-delay="200" data-delayout="0" style="top: 190px; left: 80px;">
                                        <!-- <h3><a class="button" href="<?php echo $kim->url;?>"><?php echo $kim->judul;?></a></h3> -->
                                    </div>
                                    <div class="om-layer om-layer-3" data-animation-in="fadeIn" data-animation-out="fadeOut" data-delay="500" data-delayout="0" style="top: 260px; left: 80px;">
                                    <!--    <h6><?php echo $kim->tagline;?></h6> -->
                                    </div>
                                <!-- END .om-slide-2 -->
                                </div>
                                <?php } ?>

                              <?php foreach($slide as $im){?>
                                <div class="om-slide om-slide-2">
                                    <div class="om-layer om-layer-1" data-animation-in="fadeIn" data-animation-out="fadeOut" data-delay="0"  data-delayout="300" style="top: 0px; left: 0px; width: 100%;">
                                        <img src="<?php echo base_url();?>assets/uploads/produk/b4d9b-cupwafer.jpg">/<?php echo $kim->img;?>&w=1000&h=400" alt="<?php echo $kim->judul;?>" />
                                    </div>
                                    <div class="om-layer om-layer-2" data-animation-in="fadeIn" data-animation-out="fadeOut" data-delay="200" data-delayout="0" style="top: 190px; left: 80px;">
                                        <!-- <h3><a class="button" href="<?php echo $im->url;?>"><?php echo $im->judul;?></a></h3> -->
                                    </div>
                                    <div class="om-layer om-layer-3" data-animation-in="fadeIn" data-animation-out="fadeOut" data-delay="500" data-delayout="0" style="top: 260px; left: 80px;">
                                        <!-- <h6><?php echo $im->tagline;?></h6> -->
                                    </div>
                                <!-- END .om-slide-2 -->
                                </div>
                              <?php } ?>

                            <!-- END .omnomnom-slider-inner -->
                            </div>

                            <div class="om-slider-pager">
                                <a href="#" class="active">1</a>
                                <a href="#">2</a>
                                <input type="text" class="dial" data-min="0" data-max="100" data-displayInput="false" data-readOnly="true" data-fgColor="#5d4d43" data-height="17" data-width="17" data-thickness="0.24" data-bgColor="rgba(0,0,0,0.1)">
                            </div>[enter image description here][1]

Upvotes: 0

Views: 552

Answers (1)

Paul
Paul

Reputation: 11

I'm using PHP in Codeigniter and had a similar problem. I fixed it with the following steps:

1) Use the Bootstrap carousel found here.

2) Click "try it" under one of the carousel examples and then grab the two script lines from the header and put them into your header.

Now all of my pictures are displaying properly.

Upvotes: 1

Related Questions