01/10/2018, 11:55

Carousel bootstrap ko chạy

ai giúp xem hộ e cái carousel nó chỉ hiện image với profile đầu tiên mà không thấy chạy mấy cái tiếp theo ạ

<div class="panel-testimonial">
		<div class="panel-headings"><h3 class="panel-title panel-v1">{{ text_testimonial_title }}</h3></div>
		{% set columns_count = 1 %}
		{% if testimonials|length %}
        {% set id = random(1,10)+ random() %}
	    <div id="pavtestimonial{{ id }}" class="carousel slide pavtestimonial {{ class }}">
			<div class="panel-body padding-0 owl-carousel-play"  data-ride="owlcarousel">
				<div class="owl-carousel"  data-show="{{ columns_count }}" data-pagination="false" data-navigation="true">
                    {% set pages = testimonials|batch(cols) %}
					{% set span = 12/cols %}
				{% for k,testimonials in pages %}
					<div class="carousel-inner">
					<div class="item {{ (k == 0) ? 'active' : ' }}">
					 	{% for i,testimonial in testimonials %}{% set ii = i+1 %}
						{% if (ii%cols) == 0 %}
							<div class="row">
							{% endif %}
							<div class="col-md-{{ span }} col-sm-12 col-xs-12 column">
				 				<div class="testimonial-item clearfix">
				 					<div class="t-avatar">
										<img  alt="{{ testimonial.profile|striptags }}" src="{{ testimonial.thumb }}" class="img-circle"/>
									</div>
				 					<div class="testimonial-info clearfix">
										{% if testimonial.profile %}
											<div class="profile text-center">
												{{ testimonial.profile }}
											</div>
										{% endif %}
										{% if testimonial.description %}
											<div class="testimonial-author">
												{{ testimonial.description }}
											</div>
										{% endif %}
				 					</div>
								</div>
							</div>
							{% if (i%cols == 0 or i == testimonial|length) %}
							</div>
							{% endif %}
						{% endfor %}
					</div>
					</div>
				{% endfor %}
			</div>
			{% if testimonials|length > 1 %}
			<div class="carousel-controls-v3">	
				<a class="carousel-control left" href="#pavtestimonial{{ id }}" data-slide="prev"><i class="glyphicon glyphicon-chevron-left"></i></a>
				<a class="carousel-control right" href="#pavtestimonial{{ id }}" data-slide="next"><i class="glyphicon glyphicon-chevron-right"></i></a>
			</div>
			{% endif %}
	    	</div>
	    </div>
    </div>
	{% if testimonials|length > 1 %}
	<script type="text/javascript">
	<!--
		$('#pavtestimonial{{ id }}').carousel({interval:{{ auto_play_mode?interval:'false' }},auto:{{ auto_play }},pause:'hover'});
	-->
	</script>
    {% endif %}
{% endif %}
Bài liên quan
0