【发布时间】:2016-02-14 15:18:09
【问题描述】:
当我运行滑块时,没有显示初始图像。只有在我单击“下一步”按钮后,滑块才会开始起作用。
问题链接:http://zaaroinfotechsolutions.com/zaarodemo/longbeach/corporate/(点击历史标签并一直向下滚动)
这是我的代码: html
<div class="col-sm-9" style="padding:0px;"> <div class="main-slick">
<?php
$args = array(
'posts_per_page' => -1,
'post_type' => 'slide',
'tax_query' => array(
array(
'taxonomy' => 'slide_category',
'field' => 'slug',
'terms' => 'history'
)
)
);
$query = new WP_Query($args);
while ($query->have_posts()) :
$query->the_post();
$feat_image_main = wp_get_attachment_url(get_post_thumbnail_id($post->ID));
?>
<img src="<?php echo wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?>" class="img-responsive mainimage" id="mainimage">
<?php endwhile; ?> </div> </div>
Javascript
$(document).ready(function(){
$('.main-slick').slick( { infinite: false});
});
【问题讨论】:
标签: javascript html css wordpress slick.js