jQuery - 指定循环插件的目录

发布于 2024-09-16 02:12:20 字数 1447 浏览 3 评论 0原文

暂时忘记我的问题...用词不当

我正在使用此代码进行 jQuery Cycle Slideshow...

脚本在这里...您可以跳过它并继续问题

<script type="text/javascript" src="code_snipets/jquery.js"></script>
<script type="text/javascript" src="code_snipets/jquery_plugin_cycle.js"></script>
<script language="javascript" type="text/javascript">
$(
   function()
   {
    $('ul#ullist').cycle(
            {
                fx:     'scrollHorz',
                speed:  3000,
                sync:   0,
                prev:   '#prev',
                next:   '#next',
                height: 'auto',
                cleartype:  1,
                timeout: 10000
            }
            );
   }
);
</script>

样式在这里...您可以跳过它并继续提问

ul 
{ 
    display  : block;
    margin   : 0;
    padding  : 0;
    width    : 280px;
    height   : auto;
    overflow : hidden; 
}

ul li 
{ 
    width       : 280px; 
    display     : block; 
    color       : #e0e0e0;
    font-family : Verdana;
    font-size   : 11px;
}

html代码现在在这里

<ul id="ullist2" class="ul_li">
    <li class="ul_li"><img src="images/bu_logo.png"></li>
    <li class="ul_li"><img src="images/bu_title.png"></li>
</ul>

我正在使用LIST作为我的图像...如何建议目录..意味着只需指定一个目录,它应该从目录中选取所有图像...

forget my question for a while... bad choice of words

I am using this code for a jQuery Cycle Slideshow...

script is here... you may skip it and proceed to question

<script type="text/javascript" src="code_snipets/jquery.js"></script>
<script type="text/javascript" src="code_snipets/jquery_plugin_cycle.js"></script>
<script language="javascript" type="text/javascript">
$(
   function()
   {
    $('ul#ullist').cycle(
            {
                fx:     'scrollHorz',
                speed:  3000,
                sync:   0,
                prev:   '#prev',
                next:   '#next',
                height: 'auto',
                cleartype:  1,
                timeout: 10000
            }
            );
   }
);
</script>

style is here... you may skip it and proceed to question

ul 
{ 
    display  : block;
    margin   : 0;
    padding  : 0;
    width    : 280px;
    height   : auto;
    overflow : hidden; 
}

ul li 
{ 
    width       : 280px; 
    display     : block; 
    color       : #e0e0e0;
    font-family : Verdana;
    font-size   : 11px;
}

html code is here

<ul id="ullist2" class="ul_li">
    <li class="ul_li"><img src="images/bu_logo.png"></li>
    <li class="ul_li"><img src="images/bu_title.png"></li>
</ul>

now I am using LIST for my images... how can suggest a directory.. meaning just specify a directory and it should pick all images from directory...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱*していゐ 2024-09-23 02:12:20

您不能直接执行此操作...目录不会以 100% 标准方式从 Web 服务器返回,通常发生的情况是有问题的服务器(如果目录浏览已启用)将目录转换为包含文件链接的 HTML 页面。

在 IIS、Apache、nginx 等上浏览目录会有所不同,并且该插件没有代码来解析所有这些响应并挑选出图像链接。您可以在基于目录的页面中使用服务器端处理程序呈现链接,但对于静态 HTML,插件(就像现在一样)不会执行此操作。

You can't do this directly...directories aren't returned in a 100% standard fashion from a web server, what happens usually is the server in question (if directory browsing is enabled) translates the directory to an HTML page with links to the files.

Browsing a directory on IIS vs. Apache vs. nginx, etc will be different, and the plugin doesn't have code to parse all of those responses and pick the image links out. You could have a server-side handler rendering links in the page based on a directory, but with static HTML the plugin (as it is now) won't do this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文