以随机顺序显示图像的图库列表 [英] display galleria list of images in random order

查看:128
本文介绍了以随机顺序显示图像的图库列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能随机化每次使用document.load时Galleria使用的图像列表

I was wondering if it's possible to randomise the list of images galleria uses to be different each time on document.load

有什么想法吗?

推荐答案

最简单的方法是使用您选择的脚本语言在服务器上完成此操作.如果要在客户端执行类似的操作,可以查看此插件这里,它使您可以随机排列jQuery对象的数组.

The easiest way to handle this would be to do it on the server with the scripting language of your choice. If you want to do something like this on the client side, you could look at this plugin here, which allows you to randomize an array of jQuery objects.

应尽可能简单:

$('.images').shuffle().galleria();

这篇关于以随机顺序显示图像的图库列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆