<!--
(function() {
var log = [], first, last;
time = function(message, since) {
var now = +new Date;
var seconds = ( now - ( since || last ) ) / 1000;
log.push( seconds.toFixed(3) + \': \' + message + \'<br/>\');
return last = +new Date
};
time.done = function(selector) {
time(\'total\', first);
$(selector).html(log.join(\'\'));
}
first = last = +new Date;
})();
(function($) {
$(document).ready(function() {
//작업을 수행
time(\'first\');
//또 작업을 수행
time(\'second\');
//계속 해서 수행
time(\'third\');
time.done(\'#log\');
});
}) (jQuery);
-->
jquery에서 time함수를쓰는데 왜 파라메터를 하나만 적는거지?