1jQuery(document).ready( function($) { 2 $('.wrap_familiarization_button').hide(); 3// testing navigation 4 $('div.wrap_test_question').hide(); 5 //$('div.wrap_test_question:first').show(); 6 $('.fintest_nav_links').hide(); 7 $('.wrap_submit_test').hide(); 8 9 $('.fintest_nav_links span.nav_prev').hide(); 10 11 $('.fintest_nav_links span.nav_prev').click(function() { 12 $('.wrap_test_question:visible').hide().prev('.wrap_test_question:hidden').show(); 13 $('.fintest_nav_links span.nav_next').show(); 14 if( $('.wrap_test_question:first').is(':visible') ){ 15 $('.fintest_nav_links span.nav_prev').hide(); 16 } 17 return false; 18 }); 19 20 $('.fintest_nav_links span.nav_next').on("click", function() { 21 var wrap_test_question = $('.wrap_test_question:visible'); 22 var list_type = wrap_test_question.find('.list_type').val(); 23 var is_checked = false; 24 25 if(list_type == 'multiple') { 26 var checked = []; 27 var numberOfChecked = 0; 28 wrap_test_question.find('input:checkbox:checked').each(function () 29 { 30 checked.push(parseInt($(this).val())); 31 numberOfChecked = numberOfChecked + 1; 32 }); 33 34 35 var question_answer_num = wrap_test_question.find('.question_answer_num').val(); 36 question_answer_num = parseInt(question_answer_num); 37 38 if(numberOfChecked < question_answer_num || numberOfChecked < 1) { 39 test_error_show_message(question_answer_num); 40 return false; 41 } 42 43 $.post('/wp-content/plugins/fintest/ajax.php', { 44 action: "question-submit-ajax", 45 latest_result_id: wrap_test_question.find('input.latest_result_id').attr('value'), 46 question_id: wrap_test_question.find('input.question_id').attr('value'), 47 checkbox_id: checked, 48 erudite_cat: wrap_test_question.find('input.erudite_cat').val(), 49 sp_test: wrap_test_question.find('input.sp_test').val() 50 }, function(data) { 51 }); 52 } else { 53 wrap_test_question_val = wrap_test_question.find('input:radio:checked').val(); 54 if(wrap_test_question_val > 0 && typeof wrap_test_question_val != 'undefined') { 55 } else { 56 test_error_show_message(0); 57 return false; 58 } 59 60 $.post('/wp-content/plugins/fintest/ajax.php', { 61 action: "question-submit-ajax", 62 latest_result_id: wrap_test_question.find('input.latest_result_id').attr('value'), 63 question_id: wrap_test_question.find('input.question_id').attr('value'), 64 answer_id: wrap_test_question.find('input:radio:checked').val(), 65 erudite_cat: wrap_test_question.find('input.erudite_cat').val(), 66 sp_test: wrap_test_question.find('input.sp_test').val() 67 }, function(data) { 68 }); 69 } 70 //$('html, body').stop(true,true).animate({ 71 // scrollTop: 1000 72 //}, 500, function(){ alert('blyat');}); 73 $('.wrap_test_question:visible').hide().next('.wrap_test_question:hidden').show(function() { 74 //var page_top = $('.site_content').offset().top; 75 var element_top = $('.top_element').offset().top; 76 //console.log('page_top = ' + page_top + ' | element_top =' + element_top) 77 78 //$("html").scrollTop(0); 79 if(element_top < 150) { 80 //window.scroll(0,findPos(document.getElementById("top_element"))); 81 //$('body').scrollTo('.top_element',{duration:'slow', offsetTop : '50'}); 82 //alert('bbb'); 83 $(".body_center").animate({ 84 scrollTop: 400 85 }, 500); 86 } 87 /*if(page_top > element_top) { 88 $('html, body').animate({ 89 scrollTop: $(".top_element").offset().top 90 }, 1000); 91 }*/ 92 }); 93 $('.fintest_nav_links span.nav_prev').show(); 94 if( $('.wrap_test_question:last').is(':visible') ){ 95 $('.fintest_nav_links span.nav_next').hide(); 96 $('span.submit_test_hidden').show(); 97 } 98 return false; 99 }); 100 101 $(document).on('change', '.agreement_checkbox', function() { 102 if(jQuery(this).is(':checked')) { 103 jQuery('#kolos_agreement input.agreement').addClass('agreement_active'); 104 } else { 105 jQuery('#kolos_agreement input.agreement').removeClass('agreement_active'); 106 } 107 }); 108 109 $(document).on("click", '.agreement_active', function() { 110 jQuery.fancybox.close('#kolos_agreement'); 111 jQuery.fancybox.open('#kolos_pay'); 112 jQuery('#kolos_agreement input.agreement').removeClass('agreement_active'); 113 $(".agreement_checkbox").removeAttr('checked'); 114 }); 115}); 116 117function findPos(obj) { 118 var curtop = 0; 119 if (obj.offsetParent) { 120 do { 121 curtop += obj.offsetTop; 122 } while (obj = obj.offsetParent); 123 return [curtop]; 124 } 125} 126 127function test_error_show_message(num) { 128 if(num > 0) { 129 jQuery('#kolos_error_msg2 .num').html(num); 130 jQuery.fancybox.open('#kolos_error_msg2'); 131 } else { 132 jQuery.fancybox.open('#kolos_error_msg'); 133 } 134}
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.