1 2function plugin_qc_toggle(e){ 3 var out = jQuery('#plugin__qc__out'); 4 if(!out) return; 5 6 // extract needed params from the icon src URL 7 var param = e.target.src.split('?'); 8 9 // it's shown currently -> disable 10 if(out.css('display') != 'none'){ 11 out.hide(); 12 return; 13 } 14 15 // it's not shown currently -> fetch 16 out.html('loading...'); 17 out.show(); 18 19 jQuery.get(DOKU_BASE + 'lib/plugins/qc/pageinfo.php', function(data) { 20 out.html(data); 21 }); 22} 23 24jQuery(function(){ 25 var icon = jQuery('#plugin__qc__icon'); 26 icon.click(plugin_qc_toggle); 27 icon.css('cursor', 'pointer'); 28}); 29