动态创建一个bootstrap 3.0.0 Slider

时间:2016-01-15 08:15:05

标签: html twitter-bootstrap slider carousel

我正在尝试创建一个动态的Slider来添加当月的所有员工生日,所以我有一个有3个图像的滑块,它将图像3×3滚动,但我需要动态地做这个我有我的ajax ,它与数据库相关并带来所有员工,我有一个带有图像的文件夹,我的ajax带来了用户ID,姓名,姓氏和日期以及图像。 我的代码是这样的:

<div class="container">
            <div class="row">
                <div class="col-md-3">
                    <h3>BIRTHDAY OF THE MONTH</h3>
                    <p>All employees birthdays in January</p>
                    <div class="btn-group">
                        <a class="btn btn-danger" href="#scroller" data-slide="prev"><i class="icon-angle-left"></i></a>
                        <a class="btn btn-danger" href="#scroller" data-slide="next"><i class="icon-angle-right"></i></a>
                    </div>
                    <p class="gap"></p>
                </div>
                <div class="col-md-9">
                    <div id="scroller" class="carousel slide">
                        <div class="carousel-inner">
                            <div class="item active">
                                <div class="row">
                                    <div class="col-xs-4">
                                        <div class="portfolio-item">
                                            <div class="item-inner">
                                                <img class="img-responsive" src="images/employee/ID.jpg" alt="">
                                                <h5>
                                                    NAME LAST NAME and DATE
                                                </h5>
                                            </div>
                                        </div>
                                    </div>                            
                                    <div class="col-xs-4">
                                        <div class="portfolio-item">
                                            <div class="item-inner">
                                                <img class="img-responsive" src="images/employee/ID.jpg" alt="">
                                                <h5>
                                                    NAME LAST NAME and DATE
                                                </h5>
                                            </div>
                                        </div>
                                    </div>                            
                                    <div class="col-xs-4">
                                        <div class="portfolio-item">
                                            <div class="item-inner">
                                                <img class="img-responsive" src="images/employee/ID.jpg" alt="">
                                                <h5>
                                                    NAME LAST NAME and DATE
                                                </h5>
                                            </div>
                                        </div>
                                    </div>
                                </div><!--/.row-->
                            </div><!--/.item-->
                            <div class="item">
                                <div class="row">
                                    <div class="col-xs-4">
                                        <div class="portfolio-item">
                                            <div class="item-inner">
                                                <img class="img-responsive" src="images/employee/ID.jpg" alt="">
                                                <h5>
                                                    NAME LAST NAME and DATE
                                                </h5>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-xs-4">
                                        <div class="portfolio-item">
                                            <div class="item-inner">
                                                <img class="img-responsive" src="images/employee/ID.jpg" alt="">
                                                <h5>
                                                    NAME LAST NAME and DATE
                                                </h5>
                                            </div>
                                        </div>
                                    </div>                            
                                    <div class="col-xs-4">
                                        <div class="portfolio-item">
                                            <div class="item-inner">
                                                <img class="img-responsive" src="images/employee/ID.jpg" alt="">
                                                <h5>
                                                    NAME LAST NAME and DATE
                                                </h5>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div><!--/.item-->
                        </div>
                    </div>
                </div>
            </div><!--/.row-->
        </div>

希望你能帮助我,我需要做的就是首先创建活动项目,然后如果我有超过3个图像创建另一个div与类项目,并在里面潜水另一个div与类行然后添加图像。

0 个答案:

没有答案