Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;
- jQuery(window).load(function() {
- Array.prototype.megkever = function() {
- var i = this.length;
- while (--i) {
- var j = Math.floor(Math.random() * (i + 1));
- var temp = this[i];
- this[i] = this[j];
- this[j] = temp;
- }
- return this;
- };
- var sn = jQuery;
- var sd = sn("#sidebar .widget_text");
- var last = sd.length - 1;
- var olast = sd.eq(last);
- var list = [];
- sd.each(function(i,v) {
- if(!(i == 1 || i == 0)) {
- if(i != last)
- list.push(sn(v));
- sn(v).remove();
- }
- });
- list.megkever();
- list.push(olast);
- sn(list).each(function(i,v) {
- sn(this).appendTo("#sidebar");
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement