PageSourceSearch

https://radiotropikal.com/wp-content/plugins/epoll-wp-voting/backe…/assets/js/it_epoll_opinion_voting.js?ver=1

js radiotropikal.com collected 2026-10-02 23:10:04 UTC 3,417 bytes, 80 lines download raw bytes

1jQuery(document).ready(function() {
2	
3    // Get the client's fingerprint id
4const it_epoll_client_fingerprint = '';
5	jQuery('.eg_main_content #epoll_container_opinion').each(function(){
6
7		var it_epoll_opionion_item = jQuery(this);
8		jQuery(it_epoll_opionion_item).find('#epoll_poll_opinion_form').validate({
9			errorClass:'it_epoll_opnion_opt_error',
10			errorPlacement: function(error, element) {  
11				var shakeable = jQuery(it_epoll_opionion_item).find('.epoll_poll_options');
12				jQuery(shakeable).addClass("it_epoll_shake_anim");
13 				setTimeout(function(){
14					jQuery(shakeable).removeClass("it_epoll_shake_anim"); 
15				}, 500);
16            },
17			validHandler: function(error, element) {  
18                jQuery(element).parent().parent().removeClass('it_epoll_poll_opt_with_error');
19            },
20			submitHandler:function(form){
21				
22
23
24				var it_epoll_btn  = jQuery(this);
25				if(jQuery(it_epoll_opionion_item).find('.it_epoll_multi_vote').val() == 1){
26					var formD = {
27						'action': 'it_epoll_opinion_multivote',
28						'fingerprint':it_epoll_client_fingerprint,
29						'wp_nonce':jQuery(form).find('#it_epoll_poll-security_check').val(),
30						'data': jQuery(form).serialize()// We pass php values differently!
31					};
32				}else{
33					var formD = {
34						'action': 'it_epoll_opinion_vote',
35						'fingerprint':it_epoll_client_fingerprint,
36						'wp_nonce':jQuery(form).find('#it_epoll_poll-security_check').val(),
37						'data': jQuery(form).serialize()// We pass php values differently!
38					};
39				}
40				
41		
42			// We can also pass the url value separately from ajaxurl for front end AJAX implementations
43				jQuery.ajax({url:it_epoll_ajax_obj.ajax_url, 
44					data:formD,
45					type:'POST',
46				beforeSend:function(){
47					jQuery('.epoll_poll_loader').addClass('epoll_poll_loader_show');
48				},
49				complete:function(){
50					jQuery('.epoll_poll_loader').removeClass('epoll_poll_loader_show');
51				},
52				success:function(response){
53					jQuery('.epoll_poll_loader').removeClass('epoll_poll_loader_show');
54					var it_epoll_json = jQuery.parseJSON(response);
55					var arrayOpt = [];
56					arrayOpt = it_epoll_json.options;
57					if(it_epoll_json.voting_status == 'done'){
58						
59						for (let i = 0; i < arrayOpt.length; i++) {
60							var epoll_option = arrayOpt[i];
61							var epoll_option_item = jQuery('#epoll_poll_option_id_'+epoll_option.option_id);
62							jQuery(epoll_option_item).find('.it_epoll_poll_opt_progressbar').data('count',epoll_option.vote_percentage);
63							jQuery(epoll_option_item).find('.it_epoll_otp_result_right').html(epoll_option.vote_percentage+' <span>('+epoll_option.vote_count+')</span>');
64							
65						  }
66						  jQuery(it_epoll_opionion_item).find('.it_epoll_total_vote_count').text(it_epoll_json.total_vote);
67						  jQuery(it_epoll_opionion_item).find('#epoll_opinion_show_result_button').click();
68						  jQuery(it_epoll_opionion_item).find('#epoll_opinion_hide_result_button').addClass('epoll_hide_element'); 
69					}else{
70						jQuery(it_epoll_opionion_item).find('.epoll_poll_opinion_form').prepend('<p class="epoll_opinion_voting_error it_epoll_otp_form_container_error" style="display:block;">'+it_epoll_json.msg+'</p>')
71						setTimeout( function(){jQuery(it_epoll_opionion_item).find('.epoll_opinion_voting_error').remove();} , 3000);
72					}
73				}
74			  });
75			}
76		});
77		
78	});
79
80});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.