Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
jQuery.jQueryRandom = 0;
jQuery.extend(jQuery.expr[":"], {
random: function(a, i, m, r) {
if (i == 0) {
jQuery.jQueryRandom = Math.floor(Math.random() * r.length);
};
return i == jQuery.jQueryRandom;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment