10 examples of 'refresh particular div using jquery ajax' in JavaScript

Every line of 'refresh particular div using jquery ajax' 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
25function refresh(id) {
26 if(id !== "avascript:void(0)") {
27 var iframeSelectName = "#" + id + " iframe"
28 $(iframeSelectName).attr('src', $(iframeSelectName).attr('src'));
29 }
30}
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>
91function refresh() {
92 $.ajax({
93 type: 'POST',
94 url: getPath() + '/createAllIndex',
95 success: function (data) {
96 if (data.result == 1) {
97 alert("生成索引成功!");
98 } else {
99 alert(data.msg);
100 }
101 }
102 });
103}
181function refresh(){
182 $("#refresh_btn").button('loading');
183
184 var status;
185 var time_interval;
186
187 $('input[class="status"]').parent('label').each(function(index, element){
188 if($(this).hasClass('active')) {
189 var idx = 2-index;
190 status = idx;
191 }
192 });
193 $('input[class="time_interval"]').parent('label').each(function(index, element){
194 if($(this).hasClass('active')) {
195 var idx = 2-index;
196 time_interval = idx;
197 }
198 });
199 console.log(':::'+status+'--'+time_interval);
200
201 task_query(status, time_interval);
202
203 $("#refresh_btn").button('reset');
204
205}
66function refresh_page() {
67 refresh_future_events();
68 refresh_future_summits();
69 refresh_past_summits();
70}
95function refresh()
96{
97 $('#info').load('info',
98 function()
99 {
100 // handle async links
101 $('a.asynclink').click(
102 function (event)
103 {
104 event.preventDefault();
105
106 var anchor = $(this);
107 $.get(anchor.attr('href'),
108 function (data)
109 {
110 refresh();
111 }
112 );
113 }
114 );
115
116 }
117 );
118}
470setTimeout(function refresh() {
471 $("#block").fadeOut("slow");
472}, 1000);
168function RefreshTimeout(data) {
169 var now = new Date().getTime();
170 var lastRefresh = new Date(data.Server.LastRefresh).getTime();
171
172 if ((now - lastRefresh) &gt; 30000) {
173 console.log("SERVER TIMEOUT");
174
175 if ($(".livemap-static-container").hasClass("hidden")) {
176 Timeout = true;
177 $(".livemap-static-container").removeClass("hidden");
178 ChatWorld(data.Server.ID, "Server", "Livemap connection has been lost!", "yellow");
179 }
180 } else {
181 if (!$(".livemap-static-container").hasClass("hidden")) {
182 Timeout = false;
183 $(".livemap-static-container").addClass("hidden");
184 ChatWorld(data.Server.ID, "Server", "Livemap connection has been restored!", "yellow");
185 }
186 }
187}
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}
15function change_refresh() {
16 $('#alerts').html("<div>Please wait... Refreshing data." +
17 "</div>")
18 setTimeout(function () { run_ajax(); }, 1000)
19};

Related snippets