10 examples of 'jquery page refresh' in JavaScript

Every line of 'jquery page refresh' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
33$(function refresh() {
34 $.getJSON('/', function(data, textStatus, jqXHR) {
35 $('#version').text(jqXHR.getResponseHeader('X-Pult-Version'));
36 $('#domains').empty();
37 for (var key in data) {
38 if (key == 'pult.dev') {
39 continue;
40 } else if (key == 'next') {
41 $('#next').text(data.next);
42 } else {
43 $('<a>')
44 .addClass('list-group-item')
45 .attr('href', 'http://' + key)
46 .append($('<strong>').text(key))
47 .append($('<span>').addClass('badge').text(data[key]))
48 .appendTo('#domains');
49 }
50 }
51 });
52 setTimeout(refresh, 3000);
53});</span></strong></a>
90function reloadPageImpl() {
91 // Hide everything (on entire page, not only $entryPoint)
92 if (nvl(options.clearBody, true)) {
93 $('body').html('');
94 }
95
96 // Reload window (using setTimeout, to overcome drawing issues in IE)
97 setTimeout(function() {
98 if (options.redirectUrl) {
99 window.location.href = options.redirectUrl;
100 } else {
101 window.location.reload();
102 }
103 });
104}
6function auto_refresh(){
7 var element = $(".auto-refresh");
8 clearTimeout(refresh_timeout);
9
10 if (element[0]) {
11 refresh_timeout = setTimeout(function(){
12 var autoRefreshIsOn = $(".auto-refresh").hasClass("on");
13 var hasFocus = tfm.document.doesDocumentHasFocus();
14
15 if (autoRefreshIsOn &amp;&amp; hasFocus) {
16 Turbolinks.visit(window.location.href);
17 }
18 }, 60000);
19 }
20}
16doRefresh(refresher) {
17
18 setTimeout(() =&gt; {
19 refresher.complete();
20 }, 2000);
21}
66function refresh_page() {
67 refresh_future_events();
68 refresh_future_summits();
69 refresh_past_summits();
70}
72function reload(page) {
73 loading = true;
74 $.domTemplate.getModel('list1').setParamsData({page: page}).reload({appendType: 'before'}, function () {
75 console.info("加载完成")
76 // 设置flag
77 loading = false;
78 $("#page_num").text(page);
79 });
80}
72function reload(page) {
73 loading = true;
74 $.domTemplate.getModel('list1').setParamsData({page: page}).reload({appendType: 'after'}, function () {
75 console.info("加载完成")
76 // 设置flag
77 loading = false;
78 $("#page_num").text(page);
79 });
80}
72function reload(page) {
73 loading = true;
74 $.domTemplate.getModel('list1').setParamsData({page: page}).reload({appendType: 'page'}, function () {
75 console.info("加载完成")
76 // 设置flag
77 loading = false;
78 $("#page_num").text(page);
79 });
80}
470setTimeout(function refresh() {
471 $("#block").fadeOut("slow");
472}, 1000);
117(function reload($) {
118 $.ajax({
119 'url': '/reload-content/'
120 , 'cache': false
121 , 'success': function (text) {
122 if (text === 'css') {
123 $('style,link').remove();
124 $('').appendTo('head');
125 } else if (text === 'content') {
126 setTimeout(function () {
127 window.location.reload(true);
128 }, 200);
129 } else {
130 if (text &amp;&amp; currentPath !== text) {
131 doReload = false;
132 window.location = text;
133 }
134 }
135 }
136 , 'complete': function () {
137 setTimeout(function () {
138 if (doReload) {
139 reload($);
140 }
141 }, 1000);
142 }
143 });
144})($);

Related snippets