微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何将.owl轮播转换为下拉列表?

如何解决如何将.owl轮播转换为下拉列表?

我正在为我的个人家庭流媒体网站重新设计一个Web流cms模板。我有一个session_episode.PHP文件,该文件以猫头鹰轮播格式动态列出该系列的所有相关剧集,如果该系列的内容更多,则非常不便30集。我想更换一个猫头鹰轮播,并将其内容显示为带有图像的下拉列表。我试图创建一个下拉列表,但无法创建。这是session_episode.PHP代码

    $s =0;
    $seasons = $this->common_model->get_seasons_by_videos_id($watch_videos->videos_id);
    foreach ($seasons as $season):
        if($this->common_model->get_num_episodes_by_seasons_id($season['seasons_id']) > 0):
            $episodes = $this->common_model->get_episodes_by_videos_id_and_season_id($watch_videos->videos_id,$season['seasons_id']);
            $s++;
            $i=0;
            $current_key = '000000';
            if(isset($_GET['key'])):
                $current_key = $_GET['key'];
            else:
                $current_key = $first_ep_details->stream_key;
            endif;
?>

<div class="row">
    <!-- Upcomming Movies -->
    <div class="col-md-12 col-sm-12">
        <div class="latest-movie movie-opt">
            <div class="movie-heading overflow-hidden"> <span style="color: #fff"><?PHP echo $season['seasons_name']; ?></span>
                <div class="disable-bottom-line"></div>
            </div>
        </div>
    </div>
</div>
<div class="row">
    <div class="col-md-12 col-sm-12">
        <div class="owl-carousel <?PHP echo 'season_'.$season['seasons_id']; ?>">
            <?PHP
                foreach($episodes as $episode):
                $i++;
            ?>

            <div class="item">
                <figure class="figure">
                    <?PHP if($current_key == $episode['stream_key']):?>
                        <span class="tv-ribbon">Playing..</span> 
                    <?PHP endif; ?>                                                  
                    <a href="<?PHP echo base_url().'watch/'.$watch_videos->slug.'.html?key='.$episode['stream_key']; ?>">
                        <div>                                    
                            <img class="owl-lazy" src="<?PHP echo base_url('uploads/default_image/tv_poster.jpg'); ?>" data-src="<?PHP echo $this->common_model->get_episode_image_url($episode['episodes_id']); ?>" alt="<?PHP echo $episode['episodes_name']; ?>" />
                        </div>
                        <figcaption class="figure-caption "><?PHP echo $episode['episodes_name']; ?></figcaption>
                    </a>
                </figure>
            </div>
            <?PHP endforeach; ?>
        </div>
        <script type = "text/javascript" >
            $('<?PHP echo '.season_'.$season['seasons_id']; ?>').owlCarousel({
                stagePadding: 0,loop: false,rtl: false,lazyLoad: true,margin: 15,center: false,nav: true,navText: ['<i class="fa fa-angle-left"></i>','<i class="fa fa-angle-right"></i>'],dots: false,responsive: {
                    0: {
                        items: 2
                    },600: {
                        items: 3
                    },800: {
                        items: 4
                    },1000: {
                        items: 4
                    },1200: {
                        items: 5
                    }
                }
            }); 
        </script>
    </div>
</div>

<?PHP endif; ?>
<?PHP endforeach; ?>```

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。