weixin_33725807 2012-11-05 15:39 采纳率: 0%
浏览 17

目录中的jquery滑块[关闭]

                <div class="grid--cell fl1 lh-lg">
                    <div class="grid--cell fl1 lh-lg">
                        As it currently stands, this question is not a good fit for our Q&amp;A format. We expect answers to be supported by facts, references,   or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question   can be improved and possibly reopened, <a href="/help/reopen-questions">visit the help center</a> for guidance.

                    </div>
                </div>
            </div>
            <div class="grid--cell mb0 mt8">Closed <span title="2012-11-05 20:34:17Z" class="relativetime">7 years ago</span>.</div>
        </div>
    </aside>

I'm trying to find a jquery slider which can be set to load the photos from a directory.

Can anyone recommend a slider capable to do this? Preferably with thumbnail enabled.

Any help would be appreciated!

</div>
  • 写回答

2条回答 默认 最新

  • weixin_33720186 2012-11-05 15:49
    关注

    I feel like you could see this the other way around, like the commenters above are saying.

    Why not use PHP to scan a directory (with something like scandir()) and send the result to your views ? In your views, you then only have to output the result of the scandir in the configuration of whatever slider plugin you like...

    Something like that:

    <html>
    <?php
        $mydir = "/pictures"
        $pics = scandir($mydir);
    ?>
    
    <script type="text/javascript">
      myplugin.init(){
         pic_list: '<?php echo implode("','", $pics); ?>'
      }
    </script>
    </html>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler