Monthly Archives: December 2010

jQuery Flexigrid Improved

This is the Flexigrid originally developed by by Paulo P.Mariñas with some tweaks by me.

Improvements:

  • Save state of: sort, search, column size and page (depends on jQuery Cookie)
  • Added recalcLayout function to allow the layout recalc via API (By Sven)

Download it here:  jquery.flexigrid_mjs

Reddit massive downvote

javascript:{(function(){
var elements = $(document).find('.arrow.down');
var el_num = elements.length;
var index = 0;

var stack = setInterval(function () {

    if(index >= el_num) clearInterval(stack);

    var el = $(elements).get(index);
    $(el).click();
    index++;
}, 1000);
})();}

Javscript sleep emulation techniques

function pause(millis)
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); }
while(curDate-date < millis)
}
$("div.down").each(function(){

var self = $(this);

self.click();
pause(1000);

});

Untested

var stack = {
        delay: 1000,
        actions:[],
        run: function() {
                if (stack.actions.length) {
                        stack.actions.shift()();
                        setTimeout(stack.run, stack.delay);
                }
        }
};

$(elems).each(function(){
        var that = this;
        stack.actions.push(function(){
                $(that).dostuff();
        });
});

stack.run();