7 examples of 'javascript refresh button' in JavaScript

Every line of 'javascript refresh button' 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
33function create_refresh_link()
34{
35 var refresh_div = '<div id="refresh_link"><a href="#">New Quote</a></div>';
36 $("div#quotes_footer").prepend(refresh_div);
37 $("div#refresh_link a").click(function() {
38 replace_quote();
39 return false;
40 });
41}
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

119addRefreshButton(link) {
120 this.addGeneralButton(true, {
121 title: '<i class="fa fa-refresh"></i> Refresh',
122 link: link,
123 buttonClass: 'btn btn-info'
124 });
125}
212public clickRefresh() {
213 this.router.refresh();
214}
122private handleRefresh() {
123 this.props.onActionInvoked('refresh', {});
124}
52function initRefreshButton() {
53 d3.select("#refresh_button").on("click",
54 function () {
55 $("#loading").css("display", "block");
56 $("div#svg_container").css("opacity", "0.2");
57 $.get(getTaskInstanceURL)
58 .done(
59 function (task_instances) {
60 update_nodes_states(JSON.parse(task_instances));
61 $("#loading").hide();
62 $("div#svg_container").css("opacity", "1");
63 $('#error').hide();
64 }
65 ).fail(function (jqxhr, textStatus, err) {
66 $('#error_msg').html(textStatus + ': ' + err);
67 $('#error').show();
68 $('#loading').hide();
69 $('#chart_section').hide(1000);
70 $('#datatable_section').hide(1000);
71 });
72 }
73 );
74}
395function refreshPreviewBtnHandler() {
396 refreshPreview(overlayJsonEditor.get());
397}
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}

Related snippets