GoblinaS | Date: Sunday, 2016-11-06, 11:05 PM | Message # 1 |
Group: S-Moderator
Messages: 380
|
Installing the script
1. The template complete material code pages get $ COM_BODY $ and replace it with: Code <div id="recomb">$COM_BODY$</div> 2. In the same pattern, the right place to put a link to the update (with styles it can draw as needed): Code <a href="javascript://" id="recurl">Обновить</a> 3. Finally, in the same pattern, but in the end, before the closing body, put the script: Code <script type="text/javascript"> $('#recurl').click(function(){ random = Math.floor ( Math.random () * 9999 ); $.get('$REQUEST_URI$?'+random, function(data) { $('#recomb').html($('#recomb',data).html()); } <img src="/.s/sm/24/wink.gif" border="0" align="absmiddle" alt="wink" /> ; } <img src="/.s/sm/24/wink.gif" border="0" align="absmiddle" alt="wink" /> ; </script>
|
|
|
|