简体   繁体   English

jQuery Domino像滑块插件

[英]jQuery Domino Like Slider Plugin

I am looking a jQuery-based content slider plugin. 我正在寻找一个基于jQuery的内容滑块插件。 I don't mean one like this (of which there are far too many) nor the jQueryUI slider . 我不是说这样的人 (数量太多)也不是jQueryUI滑块 What I am looking for can best be described in a picture. 我所寻找的东西最好用图片来描述。

Is there a jQuery plugin which allows me to slide (or transition) certain elements off the viewport and slide new elements in its place? 是否有一个jQuery插件,允许我从视口滑动(或过渡)某些元素并在其位置滑动新元素? Ideally, I would like to be able to ease several elements off and back onto the page in (sort of a) series, rather than one after another. 理想情况下,我希望能够(几个)系列简化几个元素,然后再放回到页面上,而不是一个接一个。 The ability to ease these elements, rather than slide them with a linear speed, would be awesome. 减轻这些元素的能力,而不是以线性速度滑动它们,真是太棒了。

This picture is the best visual I could come up with: 这张图片是我能想到的最好的视觉效果:

在此处输入图片说明

I know I could develop a plugin, as I have done several before, but I would like to avoid reinventing the wheel, if possible. 我知道我可以像以前做过的一样开发一个插件,但是如果可能的话,我想避免重新发明轮子。 Can anyone suggest a plugin? 谁能推荐一个插件?

Thank you for your time. 感谢您的时间。

If you're supporting CSS3, you could try doing something like this, albiet it may be better to build an animation class. 如果您支持CSS3,则可以尝试执行类似的操作,但是最好建立一个动画类。

.item:nth-child(1)
{
transition-timing-function            : ease-in-out;       
transition-property                    : left;
transition-duration                    : 0.1s;
transition-delay                    : 0.35s;
}

item:nth-child(2)
{
transition-timing-function            : ease-in-out;       
transition-property                    : left;
transition-duration                    : 0.1s;
transition-delay                    : 0.55s;
}

.item:nth-child(3)
{
transition-timing-function            : ease-in-out;       
transition-property                    : left;
transition-duration                    : 0.1s;
transition-delay                    : 0.65s;
}

.item:nth-child(4)
{
transition-timing-function            : ease-in-out;       
transition-property                    : left;
transition-duration                    : 0.1s;
transition-delay                    : 0.75s;
}​

If you want to use jQuery, I've had some success with http://api.jquery.com/queue/ which would allow you to craft a more complex chained animation. 如果您想使用jQuery,我在http://api.jquery.com/queue/上已经取得了一些成功,这将使您能够制作更复杂的链接动画。 For an unknown number of children you could use the slice() method. 对于未知数量的孩子,您可以使用slice()方法。

I've changed this snippet of self-executing code found on http://paulirish.com/2008/sequentially-chain-your-callbacks-in-jquery-two-ways/ 我更改了http://paulirish.com/2008/sequentially-chain-your-callbacks-in-jquery-two-ways/中找到的此自执行代码段

(function hidenext(jq){
jq.eq(0).fadeOut("fast", function(){
    (jq=jq.slice(1)).length && hidenext(jq);
});
 })($('div'))

You don't have to use fadeOut and it doesn't need to be self-executing, but it's neat and tidy way to apply a 'transition' to an unknown number of elements. 您不必使用fadeOut ,也不需要自我执行,但这是对未知数量的元素应用“过渡”的一种整洁方法。

Here's a fiddle using fadeOut http://jsfiddle.net/NpBfJ/ ... this is probably more work than you want...:-) 这是使用fadeOut的小提琴http://jsfiddle.net/NpBfJ/ ...这可能比您想要的还要多... :-)

In regards to sliders, this is one of the best free ones out there http://caroufredsel.dev7studios.com/ it has many customizable features. 关于滑块,这是最好的免费滑块之一,它具有许多可自定义的功能, 网址为http://caroufredsel.dev7studios.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM