PageSourceSearch

https://zagorje-international.hr/wp-content/plugins/epoll-wp-votin…/js/it_epoll_opinion_voting.js?ver=3.9

js zagorje-international.hr collected 2026-10-02 04:58:31 UTC 3,520 bytes, 85 lines download raw bytes

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

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.