Sult

example

Apr 22nd, 2015
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {% block js %}
  2. <script>
  3. $(function(){
  4.   var refresher = function () {
  5.     $.getJSON( "{% url 'character_sheet_data' %}", function(data) {
  6.       setTimeout(refresher, data.refresh_timer);
  7.       $("#Content").replaceWith(data.content);
  8.     });
  9.   };
  10.  
  11.   setTimeout(refresher, 300); // 0.3 seconds
  12. });
  13. </script>{% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment