is there any option in jquery to randomly select number(3)
of elements with in the same class name ?
Actually I just wanna slideup up 3 items only which should be randomly
function e(e) {
var t = $(window).scrollTop(),
n = t + $(window).height(),
r = $(e).offset().top,
i = r + $(e).height() * .8;
return i >= t && r <= n && i <= n && r >= t
}
function s() {
if (e(t) && !i) {
r.each(function (e) {
$(this).delay(200 + e * 50).animate({
top: "-110%"
}, 500)
}).each(function (e) {
$(this).delay(200 + e * 100).animate({
top: "0%"
}, 500)
});
i = !0
}
i && $(window).unbind("scroll", s)
}
var n = $("#thumbs"),
t = $(".thumbnails"),
r = n.find(".thumb-info"),
i = !1;
s();
$(window).bind("scroll", s);