File manager - Edit - /home/monara/public_html/efm_web/wp-content/plugins/radio-chart/radio-chart.js
Back
jQuery(document).ready(function($){ $('.radio-chart-wrap').on('click', '.radio-chart-vote-btn', function(e){ e.preventDefault(); var btn = $(this); if ( btn.hasClass('disabled') ) return; var songId = btn.data('song-id'); btn.prop('disabled', true).text('Voting...'); $.post(radioChart.ajax_url, { action: 'radio_chart_vote', song_id: songId, nonce: radioChart.nonce }, function(resp){ if ( resp && resp.success ) { var votes = resp.data.votes; btn.closest('.radio-chart-item').find('.radio-chart-count').text(votes); btn.text('Voted').addClass('disabled'); } else { var msg = (resp && resp.data) ? resp.data : 'Voting failed'; alert(msg); btn.prop('disabled', false).text('Vote'); } }, 'json').fail(function(){ alert('Request failed. Check your connection.'); btn.prop('disabled', false).text('Vote'); }); }); });
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings