10 examples of 'jquery refresh element' in JavaScript

Every line of 'jquery refresh element' 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
this disclaimer
131function refresh(element) {
132 const url = window.location.href;
133 let match;
134 if (element.areaLink) {
135 // Match prefix
136 let prefix = element.href;
137 // If prefix doesn't end in slash, add a slash.
138 // We want to avoid matching in the middle of a folder name.
139 if (prefix.length < url.length && prefix.substr(-1) !== '/') {
140 prefix += '/';
141 }
142 match = (url.substr(0, prefix.length) === prefix);
143 } else {
144 // Match whole path
145 match = (url === element.href);
146 }
147 element.current = match;
148}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

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});
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 && hasFocus) {
16 Turbolinks.visit(window.location.href);
17 }
18 }, 60000);
19 }
20}
17refresh(element?: FunctionsProviderItem): void {
18 this._onDidChangeTreeData.fire(element);
19}
470setTimeout(function refresh() {
471 $("#block").fadeOut("slow");
472}, 1000);
25function refresh(id) {
26 if(id !== "avascript:void(0)") {
27 var iframeSelectName = "#" + id + " iframe"
28 $(iframeSelectName).attr('src', $(iframeSelectName).attr('src'));
29 }
30}
46refresh() {
47 if (!this.shadowRoot) {
48 return;
49 }
50 if ((!this.shadowRoot.querySelector('svg')) || (!this.shadowRoot.querySelector('slot'))) {
51 return;
52 }
53 setTimeout(() => this.redraw(), 100);
54}
169_refresh: function _refresh() {
170 if (this.row_count == 0) {
171 this.$tmessage.show();
172 } else {
173 this.$tmessage.hide();
174 }
175},
106function refresh(elements, skyboxClass, params) {
107 var sameClass = (_skyboxClass === skyboxClass);
108 preview.setContext(_previewContext);
109 _skyboxClass = skyboxClass;
110 if (sameClass) {
111 if (!params) {
112 params = {
113 preserve: true,
114 reload: true
115 };
116 }
117 } else {
118 preview.clearSettingsForNewItem();
119 }
120 preview.refresh(elements, params);
121}
345private getOwnerIndex(elementJQ: JQuery) : number
346{
347 var result = -1;
348
349 var length = this._Owners.length;
350 for(var i = 0;i < length;++i) {
351 var owner = this._Owners[i];
352 if(owner.ownerJQ.is(elementJQ)) {
353 result = i;
354 break;
355 }
356 }
357
358 return result;
359}

Related snippets