[PLUGINS] +les plugins de bases
[ptitvelo/web/www.git] / www / plugins / zpip_v1 / inclure / ajax_parallel_load.html
1 [(#REM)
2
3 Squelette Big_Pipe
4 http://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919
5
6 (c) 2010 Cedric Morin
7 Distribue sous licence GPL
8
9 ]
10 #SET{bloc,#ENV{bloc}|dirname|basename}
11 <div id="zapl-#GET{bloc}" class="zapl-loading"><:zpip:zapl_loading:></div>
12 <script type="text/javascript">
13 var myurl = window.location + "";
14 myurl = myurl.split('#');
15 myurl = myurl[0] + ((myurl[0].indexOf("?")>0)?"&":"?") + "var_zajax=#GET{bloc}";
16 $.get(myurl, function(data) {
17 jQuery('document').ready(function(){
18 jQuery("#zapl-#GET{bloc}").replaceWith(data);
19 var h = window.location.hash;
20 if (h && jQuery("<div></div>").html(data).find(h).length>0) jQuery(h).positionner(true);
21 });
22 });
23 </script>
24 <noscript>
25 <meta http-equiv="refresh" content="2;url=<?php echo ($url=parametre_url(self(),'var_zapl','non'));?>" />
26 <a href="<?php echo $url ?>"><:zpip:zapl_reload_off:></a>
27 </noscript>