Widget:WJG UserExamQuery: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 56: Line 56:


};
};
function runQuery() {
function runQuery() {
var r = $.Deferred();
var api = new mw.Api();
var api = new mw.Api();
api.get({
api.get({
Line 110: Line 112:
                 }
                 }
         });
         });
});          
});
$("tr:odd").addClass("odd");
setTimeout(function (){ // and call `resolve` on the deferred object, once you're done
            $("tr:not(.odd)").hide();
r.resolve();
            $("tr:first-child").show();
}, 2500);
return r
$("tr:odd").addClass("odd");
$("tr:not(.odd)").hide();
$("tr:first-child").show();
              
              
            $("tr.odd").click(function(){
$("tr.odd").click(function(){
                $(this).next("tr").toggle();
                $(this).next("tr").toggle();
                $(this).find(".arrow").toggleClass("up");
                $(this).find(".arrow").toggleClass("up");
            });
            });
};
};


//$(document).ready(ensureLoggedIn);
//$(document).ready(ensureLoggedIn);

Revision as of 00:49, 27 July 2014