1var cookieBlock = '{settings.cookieBlock}'; 2 3$(document).ready(function() { 4 5 // this is the ajax override for the vote button 6 $('#simplePollVote').on('click', function(e) { 7 if (cookieBlock == '1' || cookieBlock == 'true') { 8 if ( ! navigator.cookieEnabled) { 9 alert('Cookies need to be activated.'); 10 return false; 11 } 12 } 13 14 // if no radio button is active, don't do anything 15 if ($('input[class=simplePollRadioClass]:checked').length === 0) { 16 return false; 17 } 18 19 var form = $('#simplePollForm'); 20 $.post(form.data('ajax-url'), form.serialize(), function(response) { 21 // replace the contents of the simple poll with the view returned from PHP 22 $('.simplePollWrap').replaceWith($(response).find('.simplePollWrap')); 23 }); 24 25 return false; 26 }); 27 28 // this is the ajax override for the see votes link 29 $('#simplePollSeeVotes').on('click', function(e) { 30 $.post($(this).data('ajax-url'), function(response) { 31 // replace the contents of the simple poll with the view returned from PHP 32 $('.simplePollWrap').replaceWith($(response).find('.simplePollWrap')); 33 }); 34 35 return false; 36 }); 37 38});
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.