web/data/cubicweb.lazy.js
author sylvain.thenault@logilab.fr
Fri, 30 Jan 2009 17:25:32 +0100
changeset 546 9cafff0e0620
parent 543 c0f2b6378f70
child 559 7cfd3d11edc8
permissions -rw-r--r--
merge


function load_now(eltsel, holesel) {
    var lazydiv = jQuery(eltsel);
    var hole = lazydiv.children(holesel);
    if (hole.length == 0) {
	/* the hole is already filled */
	return;
    }
    lazydiv.loadxhtml(lazydiv.attr('cubicweb:loadurl'));
}

function trigger_load(divid) {
    jQuery('#lazy-' + divid).trigger('load_' + divid);
}