1//V's Function Start 2 3/* $(document).ready(function(){ 4 5 6 7 jQuery('.splash_screen').click(function(){ 8 9 10 11 jQuery(this).hide('fast') 12 13 jQuery('#stie_wrap').show(); 14 15 16 17 }) 18 19 20 21 setInterval(function(){ 22 23 jQuery('.splash_screen').fadeOut('fast'); 24 25 26 27 }, 5000); 28 29 jQuery('#stie_wrap').css({ opacity: 1 }); 30 31 })*/ 32 33 34 35 36 37// <input type='hidden' name="art_name" id="art_name_1" value="Stalled Projections" /> 38 39// <input type='hidden' name="art_id" id="art_id_1" value="1" /> 40 41// <input type='hidden' name="price" id="price_1" value="50000" /> 42 43// <input type='hidden' name="qty" id="qty_1" value="1" /> 44 45// <input type='hidden' name="email" id="email_1" value="[email protected]" /> 46 47// <input type='hidden' name="code" id="code_1" value="5" /> 48 49// <a href="javascript:void(0)" class="web_btn addon arrow_r buy_now_art" id="buyart_1">Buy Now</a></figcaption> 50 51 52 53 54 55 56 57 //code to change the v alue of the link when the user is changing the selected option 58 59 60var common_prev_slashes = ''; 61var stir_prev_slashes = ''+common_prev_slashes; 62 63 $(document).ready(function() { 64 65 $(document).on('change','#change_art',function() 66 67 { 68 69 var id_to_send = $(this).find(':selected').attr('data-number'); 70 71 var price_to_use = $(this).find(':selected').attr('data-price'); 72 73 74 75 var art_name = $(this).closest('div').children('input[name="art_name"]'); 76 77 art_name.attr('id','art_name_'+id_to_send); 78 79 80 81 var art_id = $(this).closest('div').children('input[name="art_id"]'); 82 83 art_id.attr('id','art_id_'+id_to_send); 84 85 art_id.attr('value',id_to_send); 86 87 88 89 var price = $(this).closest('div').children('input[name="price"]'); 90 91 price.attr('id','price_'+id_to_send); 92 93 price.attr('value',price_to_use); 94 95 96 97 var qty = $(this).closest('div').children('input[name="qty"]'); 98 99 qty.attr('id','qty_'+id_to_send); 100 101 102 103 var email = $(this).closest('div').children('input[name="email"]'); 104 105 email.attr('id','email_'+id_to_send); 106 107 108 109 var code = $(this).closest('div').children('input[name="code"]'); 110 111 code.attr('id','code_'+id_to_send); 112 113 114 115 var link = $(this).closest('div').children('.web_btn'); 116 117 link.attr('id','buyart_'+id_to_send); 118 119 }) ; 120 121 122 123 124 125 //$(".jquery-accordion-menu ul li a").click(function(){ 126 127 //alert('1'); 128 129 //$('.submenu-indicator').parent("li").toggleClass("mb0"); 130 131 132 133 //}); 134 135 136 137 //remove code by jquery start here
138 139 /*if($(window).width() < 767) 140 141 { 142 143 //alert('mobile'); 144 145 //$('.mob_hide').remove(); 146 147 148 149 $("body").find(".mob_hide").remove(); 150 151 } 152 153 else 154 155 { 156 157 //alert('desktop'); 158 159 //$('.mob_show').remove(); 160 161 162 163 $("body").find(".mob_show").remove(); 164 165 166 167 }*/ 168 169 170 171 172 173 174 175 //remove code by jquery end here 176 177 178 179 180 181 182 183 $(".jquery-accordion-menu ul li").click(function(){ 184 185 $(this).toggleClass("mb_0"); 186 187 188 189 }); 190 191 // MOBILE MENU CODE 192 193 194 195 // Add minus icon for collapse element which is open by default 196 197 $(".collapse.show").each(function(){ 198 199 $(this).prev(".card-header").addClass("expand-minus ").removeClass("collapse-plus"); 200 201 }); 202 203 204 205 // Toggle plus minus icon on show hide of collapse element 206 207 $(".collapse").on('show.bs.collapse', function(){ 208 209 //alert("1"); 210 211 $(this).prev(".card-header").removeClass("collapse-plus").addClass("expand-minus"); 212 213 //alert("2"); 214 215 }).on('hide.bs.collapse', function(){ 216 217 $(this).prev(".card-header").removeClass("expand-minus").addClass("collapse-plus"); 218 219 }); 220 221 222 223 224 225 226 227// For Navigation open 228 229 230$(document).on('click','.open_menu',function(){ 231 $(".mobi-menu").animate({"right":"0"}, "slow").addClass('visible'); 232 $(".jquery-accordion-menu").animate({"right":"0"}, "slow").addClass('visible').css("display", "block"); 233 $(".icon-menu").addClass("btn_close"); 234 $(".icon-menu").removeClass("open_menu"); 235}); 236 237// For Navigation Close 238 239$(document).on('click','.btn_close',function(){ 240 $(".mobi-menu").animate({"right":"-100vw"}, "slow"); 241 $(".jquery-accordion-menu").animate({"right":"-100vw"}, "slow").removeClass('visible'); 242 $(".icon-menu").removeClass("btn_close"); 243 $(".icon-menu").addClass("open_menu"); 244}); 245 246 247 248 249 /* 250 251$(".mobi-menu").click(function(e){ 252 253 $(".mobi-menu").animate({"right":"-100vw"}, "slow").removeClass('visible'); 254 255 $(".jquery-accordion-menu").animate({"right":"-100vw"}, "slow").removeClass('visible'); 256 257}); */ 258 259// MOBILE MENU SCROLL STOP 260 261$(".menu_nav").click(function(){ 262 263 $("body").addClass("stopScroll"); 264 265 }); 266 267 $(".mobi_closebut,.mobi-menu").click(function(){ 268 269 $("body").removeClass("stopScroll"); 270 271 }); 272 273 274 275 /*$(document).mouseup(function(e) 276 277 { 278 279 var container = $(".mobi-menu"); 280 281 282 283 if (!container.is(e.target) && container.has(e.target).length === 0) 284 285 { 286 287 container.animate({"left":"-100vw"}, "slow").removeClass('visible'); 288 289 } 290 291 });*/ 292 293 294 295 if($(window).width() < 767 ) 296 297 { 298 299 $('.page_bolob_form').find('.form').removeClass('dark'); 300 301 //$('#contact_us').find('#blob').removeClass('blob'); 302 303 $('#main_footer .footer_col h4').click(function(){ 304 305 306 307 $(this).next('ul').slideToggle(); 308 309 }) 310 311 } else{ 312 313 $('.page_bolob_form').find('.form').addClass('dark'); 314 315 //$('#contact_us').find('#blob').addClass('blob'); 316 317 } 318 319 320 321 /* collapse category thumbnail mobile */ 322 323$('.category_band .inside_box.see .plus').click(function(){ 324 325 $('.category_band .inside_box').show(); 326 327 328 329 $('.main_category_article_section').hide('fast'); 330 331 $('#see_sec').slideDown(); 332 333 $("html, body").animate({ scrollTop: 0 }, "slow"); 334 335}) 336 337$('.category_band .inside_box.think .plus').click(function(){ 338 339 $("html, body").animate({ scrollTop: 0 }, "slow"); 340 341 $('.category_band .inside_box').show(); 342 343 344 345 $('.main_category_article_section').hide('fast'); 346 347 $('#think_sec').slideDown(); 348 349 350 351 352 353}) 354 355$('.category_band .inside_box.inspire .plus').click(function(){ 356 357 $('.category_band .inside_box').show(); 358 359 360 361 $('.main_category_article_section').hide('fast'); 362 363 $('#inspire_sec').slideDown(); 364 365 $("html, body").animate({ scrollTop: 0 }, "slow"); 366 367}) 368 369$('.category_band .inside_box.reflect .plus').click(function(){ 370 371 $('.category_band .inside_box').show(); 372 373 $('.main_category_article_section').hide('fast'); 374 375 $('#reflect_sec').slideDown(); 376 377 $("html, body").animate({ scrollTop: 0 }, "slow"); 378 379}) 380 381 382 383$('.main_category_article_section .close').click(function(){ 384
385 $(this).parent('.main_category_article_section').slideUp(); 386 387}) 388 389 390 391 //Function for our top right priority Start 392 393 $('.nav-toggle li a').mouseover(function(){ 394 395 //alert(); 396 397 $('.nav-toggle li a').css({"opacity":"1"}); 398 399 //$('.nav-toggle li a').css({"opacity":"1","text-decoration":"underline"}); 400 401 }); 402 403 404 405 $('.nav-toggle li a').mouseout(function(){ 406 407 //alert(); 408 409 $('.nav-toggle li a').css({"opacity":"0.6"}); 410 411 //$('.nav-toggle li a').css({"opacity":"0.6","text-decoration":"none"}); 412 413 //$('.nav-toggle li a').css("opacity","0.6"); 414 415 }); 416 417 //Function for our top right priority End 418 419 420 421 422 423 424 425}); 426 427 428 429 430 431 432 433 434 435//Blob Remove start 436 437 438 439/*$(window).on('resize', function () { 440 441 $('#contact_us').find('#blob').removeClass('blob', $(window).width() < 768); 442 443 $('#contact_us').find('#blob').addClass('blob', $(window).width() > 768); 444 445});*/ 446 447 448 449 450 451//Blob Remove End 452 453 454 455//V's Function End 456 457 458 459//N's Function Start 460 461 462 463 464 465 466 467 468 469 470 471$(document).ready(function(){ 472 473 474 475$('.yellow').click(function(){ 476 477 console.log('yes'); 478 479 }); 480 481 $('.change_art').change(function() { 482 483 alert( this.value ); 484 485 console.log('hi'); 486 487}); 488 489 490 491 492 493 $(".custom-select").each(function() { 494 495 var classes = $(this).attr("class"), 496 497 id = $(this).attr("id"), 498 499 name = $(this).attr("name"); 500 501 var template = '<div class="' + classes + '">'; 502 503 template += '<span class="custom-select-trigger">' + $(this).attr("placeholder") + '</span>'; 504 505 template += '<div class="custom-options">'; 506 507 $(this).find("option").each(function() { 508 509 template += '<span class="custom-option ' + $(this).attr("class") + '" data-value="' + $(this).attr("value") + '">' + $(this).html() + '</span>'; 510 511 }); 512 513 template += '</div></div>'; 514 515 516 517 $(this).wrap('<div class="custom-select-wrapper"></div>'); 518 519 $(this).hide(); 520 521 $(this).after(template); 522 523 }); 524 525 $(".custom-option:first-of-type").hover(function() { 526 527 $(this).parents(".custom-options").addClass("option-hover"); 528 529 }, function() { 530 531 $(this).parents(".custom-options").removeClass("option-hover"); 532 533 }); 534 535 $(".custom-select-trigger").on("click", function() { 536 537 $('html').one('click',function() { 538 539 $(".custom-select").removeClass("opened"); 540 541 }); 542 543 $(this).parents(".custom-select").toggleClass("opened"); 544 545 event.stopPropagation(); 546 547 }); 548 549 $(".custom-option").on("click", function() { 550 551 $(this).parents(".custom-select-wrapper").find("select").val($(this).data("value")); 552 553 $(this).parents(".custom-options").find(".custom-option").removeClass("selection"); 554 555 $(this).addClass("selection"); 556 557 $(this).parents(".custom-select").removeClass("opened"); 558 559 $(this).parents(".custom-select").find(".custom-select-trigger").text($(this).text()); 560 561 562 563 564 565 }); 566 567 568 569/* $(document).on('click',".loginbut",function() { 570 571 $(".loginpopup, .loginpopupoverlay").show(); 572 573 $(".signuppopup, .signuppopupoverlay").hide(); 574 575 }); 576 577 $(document).on('click',".loginpopupclose",function() { 578 579 $(".loginpopup, .loginpopupoverlay").hide(); 580 581 }); 582 583 584 585 $(document).on('click',".signmebut",function() { 586 587 $(".signuppopup, .signuppopupoverlay").show(); 588 589 $(".loginpopup, .loginpopupoverlay").hide(); 590 591 }); 592 593 $(document).on('click',".signuppopupclose",function() { 594 595 $(".signuppopup, .signuppopupoverlay").hide(); 596 597 }); 598 599 600 601 */ 602 603 604 605 $(document).on('click',".fillinks ul li a",function() { 606 607 $(this).toggleClass("active"); 608 609 }); 610 611 $(document).on('click',"a.iconlinks",function() { 612 613 $(this).toggleClass("iconlinksactive"); 614 615 }); 616 617 618 619 $(document).on('click',".resetfilterbut",function() { 620 621 $(".fillinks ul li a").removeClass("active"); 622 623 }); 624 625 $(document).on('click',".resetfilterbut",function() { 626 627 $(".iconlinks").removeClass("iconlinksactive"); 628 629 }); 630 631 632 633 $(document).on('click',".congpopbut",function() { 634 635 $(".congpopupoverlay").show(); 636 637 $(".congpopup").show(); 638 639 }); 640 641 $(document).on('click',".congpopupclose",function() { 642 643 $(".congpopupoverlay").hide(); 644 645 $(".congpopup").hide(); 646 647 }); 648 649 650 651 652 653 654 655 656 657 658 659 /*var headerHeight = $('#main_header').height(); 660 661 var footerHeight = $('#main_footer').height(); 662 663 $('.flexslider').css('height',$(window).height()+headerHeight);*/ 664 665 // $('.searchpopup').css('height',$(window).height()); 666 667 668 669 $(".vidbutton").click(function(){ 670 671 $(".vidpopbg").fadeIn("fast"); 672 673 $(".vidpopup").fadeIn("fast"); 674 675 }); 676 677 $(".popclose").click(function(){ 678 679 $(".vidpopbg").fadeOut("fast"); 680 681 $(".vidpopup").fadeOut("fast"); 682 683 }); 684 685 686 687 $('.stopv').on('click', function() { 688 689 $('#vid_player')[0].contentWindow.postMessage('{"event":"command","func":"' + 'stopVideo' + '","args":""}', '*'); 690 691 }); 692 693 694 695 //Event Calender start 696 697 $(".today_event").click(); 698 699 //Event Calender End 700 701 702 703 704 705}); 706 707 //Event Calender Change Start 708 709 $('.month_dropdown').on('change',function(){ 710 711 //alert('m'); 712 713 getCalendar('calendar_div', $('.year_dropdown').val(), $('.month_dropdown').val()); 714 715 }); 716 717 $('.year_dropdown').on('change',function(){ 718 719 //alert('y'); 720 721 getCalendar('calendar_div', $('.year_dropdown').val(), $('.month_dropdown').val()); 722 723 }); 724 725 //Event Calender Change End 726 727 728 729 730 731 /*$(window).scroll(function() { 732 733 scrollPos = $(window).scrollTop(); 734 735 if (scrollPos > 820){ 736 737 $(".socials").css({"left":"19vw", "position":"fixed", "top":"1vw"}); 738 739 } else{ 740 741 $(".socials").css({"left":"-8.4vw", "position":"absolute", "top":"12vw"}); 742 743 } 744 745 });*/ 746 747 748 749//N's Function End 750 751 752 753//M's Function Start 754 755 756 757 //Load More Function Start 758 759 760 761 $(document).ready(function() 762 763 { 764 765 // For See Inner Page 766 767 $(document).on('click','.see',function() 768 769 { 770 771 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 772 773 774 775 var o_id = $(this).attr('id'); 776 777 778 779 var str = o_id.split("_"); 780 781 782 783 var id = str[1]; 784 785 786 787 var q = $("#q").val(); 788 789 $('.btn.see').hide(); 790 791 $.ajax({ 792 793 type:'POST', 794 795 url:'ajax_see.php', 796 797 data:{id:id,q:q}, 798 799 success:function(html) 800 801 { 802 803 $('._b').remove(); 804 805 //alert(html); 806 807 $('#row').append(html); 808 809 } 810 811 }); 812 813 }); 814 815 816 817 // For See Main Page 818 819 $(document).on('click','.see_cat',function() 820 821 { 822 823 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 824 825 826 827 var o_id = $(this).attr('id'); 828 829 830 831 var str = o_id.split("_"); 832 833 834 835 var id = str[1]; 836 837 838 839 //alert(id); 840 841 842 843 var q = $("#q").val(); 844 845 var fixed_id = $("#fixed_id").val(); 846 847 $('.btn.see_cat').hide(); 848 849 $.ajax({ 850 851 type:'POST', 852 853 url:'ajax_see_cat.php', 854 855 data:{id:id,q:q,fixed_id:fixed_id}, 856 857 success:function(html) 858 859 { 860 861 $('._b').remove(); 862 863 //alert(html); 864 865 $('#row').append(html); 866 867 } 868 869 }); 870 871 }); 872 873 874 875 // For Think Inner Page 876 877 $(document).on('click','.think',function() 878 879 { 880 881 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 882 883 884 885 var o_id = $(this).attr('id'); 886 887 888 889 var str = o_id.split("_"); 890 891 892 893 var id = str[1]; 894 895 896 897 var q = $("#q").val(); 898 899 $('.btn.think').hide(); 900 901 $('.loding').show(); 902 903 $.ajax({ 904 905 type:'POST', 906 907 url:'ajax_think.php', 908 909 data:{id:id,q:q}, 910 911 success:function(html) 912 913 { 914 915 $('._b').remove(); 916 917 //alert(html); 918 919 $('#row').append(html); 920 921 } 922 923 }); 924 925 }); 926 927 928 929 // For Think Main Page 930 931 $(document).on('click','.think_cat',function() 932 933 { 934 935 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 936 937 938 939 var o_id = $(this).attr('id'); 940 941 942 943 var str = o_id.split("_"); 944 945 946 947 var id = str[1]; 948 949 950 951 var q = $("#q").val(); 952 953 var fixed_id = $("#fixed_id").val(); 954 955 $('.btn.think_cat').hide(); 956 957 $('.loding').show(); 958 959 $.ajax({ 960 961 type:'POST', 962 963 url:'ajax_think_cat.php', 964 965 data:{id:id,q:q,fixed_id:fixed_id}, 966 967 success:function(html) 968 969 { 970 971 $('._b').remove(); 972 973 //alert(html); 974 975 $('#row').append(html); 976 977 } 978 979 }); 980 981 }); 982 983 984 985 // For Inspire Inner Page 986 987 $(document).on('click','.inspire',function() 988 989 { 990 991 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 992 993 994 995 var o_id = $(this).attr('id'); 996 997 998 999 var str = o_id.split("_"); 1000 1001 1002 1003 var id = str[1]; 1004 1005 1006 1007 var q = $("#q").val(); 1008 1009 $('.btn.inspire').hide(); 1010 1011 $('.loding').show(); 1012 1013 $.ajax({ 1014 1015 type:'POST', 1016 1017 url:'ajax_inspire.php', 1018 1019 data:{id:id,q:q}, 1020 1021 success:function(html) 1022 1023 { 1024 1025 $('._b').remove(); 1026 1027 //alert(html); 1028 1029 $('#row').append(html); 1030 1031 } 1032 1033 }); 1034 1035 }); 1036 1037 1038 1039 // For Inspire Main Page 1040 1041 $(document).on('click','.inspire_cat',function() 1042 1043 { 1044 1045 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 1046 1047 1048 1049 var o_id = $(this).attr('id'); 1050 1051 1052 1053 var str = o_id.split("_"); 1054 1055 1056 1057 var id = str[1]; 1058 1059 1060 1061 var q = $("#q").val(); 1062 1063 var fixed_id = $("#fixed_id").val(); 1064 1065 $('.btn.inspire_cat').hide(); 1066 1067 $('.loding').show(); 1068 1069 $.ajax({ 1070 1071 type:'POST', 1072 1073 url:'ajax_inspire_cat.php', 1074 1075 data:{id:id,q:q,fixed_id:fixed_id}, 1076 1077 success:function(html) 1078 1079 { 1080 1081 $('._b').remove(); 1082 1083 //alert(html); 1084 1085 $('#row').append(html); 1086 1087 } 1088 1089 }); 1090 1091 }); 1092 1093 1094 1095 // For Reflect 1096 1097 $(document).on('click','.reflect',function() 1098 1099 { 1100 1101 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 1102 1103 var id = $(this).attr('id'); 1104 1105 var q = $("#q").val(); 1106 1107 $('.btn.reflect').hide(); 1108 1109 $('.loding').show(); 1110 1111 $.ajax({ 1112 1113 type:'POST', 1114 1115 url:'ajax_reflect.php', 1116 1117 data:{id:id,q:q}, 1118 1119 success:function(html) 1120 1121 { 1122 1123 $('._b').remove(); 1124 1125 //alert(html); 1126 1127 $('#row').append(html); 1128 1129 } 1130 1131 }); 1132 1133 }); 1134 1135 1136 1137 // For Similar 1138 1139 $(document).on('click','.similar',function() 1140 1141 { 1142 1143 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 1144 1145 //var id = $(this).attr('id'); 1146 1147 1148 1149 var o_id = $(this).attr('id'); 1150 1151 1152 1153 var str = o_id.split("_"); 1154 1155 1156 1157 var id = str[1]; 1158 1159 1160 1161 var q = $("#q").val(); 1162 1163 var t = $("#t").val(); 1164 1165 var current = $("#current").val(); 1166 1167 $('.btn.similar').hide(); 1168 1169 $('.loding').show(); 1170 1171 $.ajax({ 1172 1173 type:'POST', 1174 1175 url:'ajax_similar.php', 1176 1177 data:{id:id,q:q,current:current,t:t}, 1178 1179 success:function(html) 1180 1181 { 1182 1183 $('._b').remove(); 1184 1185 //alert(html); 1186 1187 $('#row').append(html); 1188 1189 } 1190 1191 }); 1192 1193 }); 1194 1195 1196 1197 // For Stirring 1198 1199 $(document).on('click','.stirring_rand',function() 1200 1201 { 1202 1203 var s_r = $(".stir_rand").text(); 1204 1205 $("#stirring_sec_web").html('<span class="loader _b loading_icon" style="height: 3vw;width: 3vw;"> </span>'); 1206 1207 $("#stirring_sec_mob").html('<span class="loader _b loading_icon" style="height: 30px;width: 30px;"> </span>'); 1208 1209 $("#stirring_sec_header").html('<span class="loader _b loading_icon" style="height: 30px;width: 30px;"> </span>'); 1210 1211 $.ajax({ 1212 1213 type:'POST', 1214 1215 url:'ajax_stirring.php', 1216 1217 data:{s_r:s_r}, 1218 1219 success:function(returnedData) 1220 1221 { 1222 1223 $('._b').remove(); 1224 1225 //alert(returnedData); 1226 1227 $('#stirring_sec_web').html(returnedData); 1228 1229 $('#stirring_sec_mob').html(returnedData); 1230 1231 $('#stirring_sec_header').html(returnedData); 1232 1233 } 1234 1235 }); 1236 1237 1238 1239 }); 1240 1241 1242 1243 //For Newsroom 1244 1245 $(document).on('click','.newsroom',function() 1246 1247 { 1248 1249 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 1250 1251 var id = $(this).attr('id'); 1252 1253 var current = $("#current").val(); 1254 1255 //alert(id); 1256 1257 //alert(current); 1258 1259 $('.btn.newsroom').hide(); 1260 1261 $('.loding').show(); 1262 1263 $.ajax({ 1264 1265 type:'POST', 1266 1267 url:'ajax_newsroom.php', 1268 1269 data:{id:id,current:current}, 1270 1271 success:function(html) 1272 1273 { 1274 1275 $('._b').remove(); 1276 1277 $('#row').append(html); 1278 1279 } 1280 1281 }); 1282 1283 }); 1284 1285 1286 1287 //Count Number Of Image Start 1288 1289 var tcounters = $( "a[data-fancybox]" ).length; 1290 1291 $(".tcounters").text(tcounters); 1292 1293 //Count Number Of Image End 1294 1295 1296 1297 // For Leave this 1298 1299 $(document).on('click','.leave',function() 1300 1301 { 1302 1303 var id = $(this).attr('id'); 1304 1305 $('.btn.leave#'+id).replaceWith('<span class="loader _b"> </span>'); 1306 1307 $.ajax({ 1308 1309 type:'POST', 1310 1311 url:'ajax_leave.php', 1312 1313 data:{id:id}, 1314 1315 success:function(html) 1316 1317 { 1318 1319 $('._b').remove(); 1320 1321 //alert(html); 1322 1323 //$('#row').append(html); 1324 1325 1326 1327 window.location.reload(); 1328 1329 } 1330 1331 }); 1332 1333 }); 1334 1335 1336 1337 }); 1338 1339 1340 1341 //Load More Function End 1342 1343 1344 1345 //Check Prfession start 1346 1347 1348 1349 //$( ".check_h" ).change(function() 1350 1351 $(document).on('change','.check_h',function() 1352 1353 { 1354 1355 var pro = $( "#validationTooltip03" ).val(); 1356 1357 //alert(pro+"<-tester"); 1358 1359 if((pro == 'Specialist Consultant') || (pro == 'Other')) 1360 1361 { 1362 1363 $(".profession_other").fadeIn('fast'); 1364 1365 $(".profession_other").prop('required',true); 1366 1367 } 1368 1369 else 1370 1371 { 1372 1373 $(".profession_other").prop('required',false); 1374 1375 $(".profession_other" ).fadeOut('slow'); 1376 1377 } 1378 1379 }); 1380 1381 1382 1383 //Check Profession End 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 //Reset Profile Start 1399 1400 1401 1402 var uname = $('#uname').val(); 1403 1404 var profession = $('#profession').val(); 1405 1406 var profile_pic = $('#profile_pic').attr('src'); 1407 1408 $(document).on('click','#cancel_profile',function() 1409 1410 { 1411 1412 //alert(uname); 1413 1414 //alert(profession); 1415 1416 $('#uname').val(uname); 1417 1418 $('#profession').val(profession); 1419 1420 $('#profile_pic').attr('src', profile_pic); 1421 1422 1423 1424 }); 1425 1426 1427 1428 //Reset Profile End 1429 1430 1431 1432 //Check Prfession start update profile 1433 1434 1435 1436 $(document).on('change','.check_s',function() 1437 1438 { 1439 1440 1441 1442 var pro = $( "#sources" ).val(); 1443 1444 if((pro == 'Specialist Consultant') || (pro == 'Other')) 1445 1446 { 1447 1448 $(".profession_other").fadeIn('fast'); 1449 1450 $(".profession_other").prop('required',true); 1451 1452 } 1453 1454 else 1455 1456 { 1457 1458 $(".profession_other").prop('required',false); 1459 1460 $(".profession_other" ).fadeOut('slow'); 1461 1462 } 1463 1464 }); 1465 1466 1467 1468 //Check Profession End update profile 1469 1470 1471 1472 //Update Profile Start 1473 1474 1475 1476 $(document).on('click','#tick_profile',function() 1477 1478 { 1479 1480 //alert(); 1481 1482 $("#profile_form").find(".p_s").removeClass("error"); 1483 1484 $("#profile_form").find(".profession_other").removeClass("error"); 1485 1486 $("#profile_form").find(".uname").removeClass("error"); 1487 1488 $("#profile_form").find(".error_message").remove(); 1489 1490 var count_bug=0; 1491 1492 if (document.profile_form.sources.value=="") 1493 1494 { 1495 1496 $("#profile_form").find(".p_s").addClass("error"); 1497 1498 $("#profile_form").find(".p_s").after("<span class='error_message'>Profession Can't be empty.</span>"); 1499 1500 document.profile_form.sources.focus(); 1501 1502 if(eval(count_bug)==0) 1503 1504 count_bug+=1; 1505 1506 } 1507 1508 else if((document.profile_form.sources.value == 'Specialist Consultant') || (document.profile_form.sources.value == 'Other')) 1509 1510 { 1511 1512 1513 1514 if (document.profile_form.p_other.value=="") 1515 1516 { 1517 1518 $("#profile_form").find(".profession_other").addClass("error"); 1519 1520 $("#profile_form").find(".profession_other").after('<span class="error_message">Required</span>'); 1521 1522 document.profile_form.p_other.focus(); 1523 1524 if(eval(count_bug)==0) 1525 1526 count_bug+=1; 1527 1528 } 1529 1530 else 1531 1532 { 1533 1534 var c_p_other = $( "input[name=p_other]" ).val(); 1535 1536 var check_c_p_other = validURL(c_p_other); 1537 1538 //alert(check_c_p_other); 1539 1540 if(check_c_p_other == false) 1541 1542 { 1543 1544 //do nothing 1545 1546 } 1547 1548 else 1549 1550 { 1551 1552 $("#profile_form").find(".profession_other").addClass("error"); 1553 1554 $("#profile_form").find(".profession_other").after('<span class="error_message">Required</span>'); 1555 1556 document.profile_form.p_other.focus(); 1557 1558 if(eval(count_bug)==0) 1559 1560 count_bug+=1; 1561 1562 } 1563 1564 } 1565 1566 1567 1568 } 1569 1570 1571 1572 if (document.profile_form.uname.value=="") 1573 1574 { 1575 1576 $("#profile_form").find(".user").addClass("error"); 1577 1578 $("#profile_form").find(".user").after("<span class='error_message'>Username Can't be empty.</span>"); 1579 1580 document.profile_form.uname.focus(); 1581 1582 if(eval(count_bug)==0) 1583 1584 count_bug+=1; 1585 1586 } 1587 1588 else 1589 1590 { 1591 1592 var c_uname = $( "input[name=uname]" ).val(); 1593 1594 var check_c_uname = validURL(c_uname); 1595 1596 //alert(check_c_uname); 1597 1598 if(check_c_uname == false) 1599 1600 { 1601 1602 //do nothing 1603 1604 } 1605 1606 else 1607 1608 { 1609 1610 $("#profile_form").find(".user").addClass("error"); 1611 1612 document.profile_form.uname.focus(); 1613 1614 if(eval(count_
1614bug)==0) 1615 1616 count_bug+=1; 1617 1618 } 1619 1620 } 1621 1622 1623 1624 if(count_bug == 0) 1625 1626 { 1627 1628 $('#profile_form').attr('action','profile-next.php'); 1629 1630 $('#profile_form').submit(); 1631 1632 } 1633 1634 else 1635 1636 { 1637 1638 event.stopPropagation(); 1639 1640 event.preventDefault(); 1641 1642 return false; 1643 1644 } 1645 1646 }); 1647 1648 1649 1650 //Update Profile End 1651 1652 1653 1654 //Reset Password Start 1655 1656 1657 1658 $(document).on('click','#cancel_password',function() 1659 1660 { 1661 1662 $('#n_password').val(''); 1663 1664 $('#c_password').val(''); 1665 1666 $('#co_password').val(''); 1667 1668 1669 1670 }); 1671 1672 1673 1674 //Reset Password End 1675 1676 1677 1678 //Change Password Start 1679 1680 $(document).on('click','#tick_password',function() 1681 1682 { 1683 1684 $("#password_profile").find(".co_password").removeClass("error"); 1685 1686 $("#password_profile").find(".n_password").removeClass("error"); 1687 1688 $(".error_message").remove(); 1689 1690 1691 1692 var count_bug=0; 1693 1694 if (document.password_profile.co_password.value=="") 1695 1696 { 1697 1698 $("#password_profile").find(".co_password").addClass("error"); 1699 1700 //$(".co_password").after('<span class="error_message">Your password must be at least 8 chararacters long</span>'); 1701 1702 $(".co_password").after('<span class="error_message">Required</span>'); 1703 1704 document.password_profile.co_password.focus(); 1705 1706 if(eval(count_bug)==0) 1707 1708 count_bug+=1; 1709 1710 } 1711 1712 else if (document.password_profile.co_password.value.length <= 7) 1713 1714 { 1715 1716 $("#password_profile").find(".co_password").addClass("error"); 1717 1718 $(".co_password").after('<span class="error_message">Minimum 8 characters required for password.</span>'); 1719 1720 //$(".co_password").after('<span class="error_message">Required</span>'); 1721 1722 document.password_profile.co_password.focus(); 1723 1724 if(eval(count_bug)==0) 1725 1726 count_bug+=1; 1727 1728 } 1729 1730 1731 1732 else if (document.password_profile.co_password.value != document.password_profile.n_password.value) 1733 1734 { 1735 1736 $(".co_password").after('<span class="error_message">Password does not match.</span>'); 1737 1738 //$(".co_password").after('<span class="error_message">Required</span>'); 1739 1740 document.password_profile.n_password.focus(); 1741 1742 //document.password_profile.co_password.focus(); 1743 1744 if(eval(count_bug)==0) 1745 1746 count_bug+=1; 1747 1748 } 1749 1750 1751 1752 var pswd = $('#n_password').val(); 1753 1754 //var regularExpression = /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]/; 1755 1756 var regularExpression = "^(?=.*[A-Z])(?=.*\\d)(?=.*[-+_!@#$%^&*.,?]).+$"; 1757 1758 //alert(pswd); 1759 1760 if (pswd == "") 1761 1762 { 1763 1764 $("#password_profile").find(".n_password").addClass("error"); 1765 1766 //$("#password_profile").find(".n_password").after('<span class="error_message">Your new password must be at least 8 chararacters long</span>'); 1767 1768 $("#password_profile").find(".n_password").after('<span class="error_message">Required</span>'); 1769 1770 document.password_profile.n_password.focus(); 1771 1772 if(eval(count_bug)==0) 1773 1774 count_bug+=1; 1775 1776 } 1777 1778 else if(pswd.length <= 7) 1779 1780 { 1781 1782 $("#password_profile").find(".n_password").addClass("error"); 1783 1784 $("#password_profile").find(".n_password").after('<span class="error_message">Minimum 8 characters required for password.</span>'); 1785 1786 //$("#password_profile").find(".n_password").after('<span class="error_message">Required</span>'); 1787 1788 document.password_profile.n_password.focus(); 1789 1790 if(eval(count_bug)==0) 1791 1792 count_bug+=1; 1793 1794 } 1795 1796 else if(!(pswd.match(regularExpression))) 1797 1798 { 1799 1800 $("#password_profile").find(".n_password").addClass("error"); 1801 1802 $("#password_profile").find(".n_password").after('<span class="error_message">Password must be contains one capital letter, one digit and one special character.</span>'); 1803 1804 //$("#password_profile").find(".n_password").after('<span class="error_message">Required</span>'); 1805 1806 document.password_profile.n_password.focus(); 1807 1808 if(eval(count_bug)==0) 1809 1810 count_bug+=1; 1811 1812 } 1813 1814 1815 1816 /*if (document.password_profile.c_password.value=="") 1817 1818 { 1819 1820 $("#password_profile").find(".c_password").addClass("error"); 1821 1822 document.password_profile.c_password.focus(); 1823 1824 if(eval(count_bug)==0) 1825 1826 count_bug+=1; 1827 1828 }*/ 1829 1830 1831 1832 if(count_bug == 0) 1833 1834 { 1835 1836 //var c_password = $('#c_password').val(); 1837 1838 var n_password = $('#n_password').val(); 1839 1840 var co_password = $('#co_password').val(); 1841 1842 //alert(email); 1843 1844 $.post("password-next.php",{n_password:n_password,co_password:co_password},function(result){ 1845 1846 //alert(result); 1847 1848 if(result == 1) 1849 1850 { 1851 1852 $(".co_password").after('<span class="error_message">Current password does not match.</span>'); 1853 1854 } 1855 1856 else 1857 1858 { 1859 1860 $(".co_password").after('<span class="error_message" style="color: rgba(228,99,143,.9);">Your password has been successfully changed.</span>'); 1861 1862 setTimeout(function(){ $(".co_password").find('.error_message').fadeOut();$(".co_password").find('.error_message').remove(); }, 3000); 1863 1864 $('#n_password').val(''); 1865 1866 //$('#c_password').val(''); 1867 1868 $('#co_password').val(''); 1869 1870 } 1871 1872 }); 1873 1874 } 1875 1876 else 1877 1878 { 1879 1880 event.stopPropagation(); 1881 1882 event.preventDefault(); 1883 1884 return false;
1885 1886 } 1887 1888 1889 1890 }); 1891 1892 1893 1894 //Change Password End 1895 1896 1897 1898 1899 1900 1901 1902 //Reset Others settings Start 1903 1904 1905 1906 var conversations = $('#conversations').prop('checked'); 1907 1908 var historys = $('#history').prop('checked'); 1909 1910 var r_articles = $('#r_articles').prop('checked'); 1911 1912 var signed_in = $('#signed_in').prop('checked'); 1913 1914 var archive = $('#archive').prop('checked'); 1915 1916 var os_stirfri_check = $('#os_stirfri_check').prop('checked'); 1917 1918 var p_subscriber = $('#p_subscriber').prop('checked'); 1919 1920 $(document).on('click','#cancel_o_settings',function() 1921 1922 { 1923 1924 if(conversations == true) 1925 1926 { 1927 1928 $('#conversations').prop('checked',true); 1929 1930 } 1931 1932 else 1933 1934 { 1935 1936 $('#conversations').prop('checked',false); 1937 1938 } 1939 1940 if(historys == true) 1941 1942 { 1943 1944 $('#history').prop('checked',true); 1945 1946 } 1947 1948 else 1949 1950 { 1951 1952 $('#history').prop('checked',false); 1953 1954 } 1955 1956 if(r_articles == true) 1957 1958 { 1959 1960 $('#r_articles').prop('checked',true); 1961 1962 } 1963 1964 else 1965 1966 { 1967 1968 $('#r_articles').prop('checked',false); 1969 1970 } 1971 1972 if(signed_in == true) 1973 1974 { 1975 1976 $('#signed_in').prop('checked',true); 1977 1978 } 1979 1980 else 1981 1982 { 1983 1984 $('#signed_in').prop('checked',false); 1985 1986 } 1987 1988 if(archive == true) 1989 1990 { 1991 1992 $('#archive').prop('checked',true); 1993 1994 } 1995 1996 else 1997 1998 { 1999 2000 $('#archive').prop('checked',false); 2001 2002 } 2003 2004 if(os_stirfri_check == true) 2005 2006 { 2007 2008 $('#os_stirfri_check').prop('checked',true); 2009 2010 $(".os_prefrences_checkbox").show(); 2011 2012 } 2013 2014 else 2015 2016 { 2017 2018 $('#os_stirfri_check').prop('checked',false); 2019 2020 $(".os_prefrences_checkbox").hide(); 2021 2022 } 2023 2024 if(p_subscriber == true) 2025 2026 { 2027 2028 $('#p_subscriber').prop('checked',true); 2029 2030 } 2031 2032 else 2033 2034 { 2035 2036 $('#p_subscriber').prop('checked',false); 2037 2038 } 2039 2040 2041 2042 }); 2043 2044 2045 2046 //Reset Others settings End 2047 2048 2049 2050 //Change Others settings Start 2051 2052 $(document).on('click','#tick_o_settings',function() 2053 2054 { 2055 2056 var count_bug=0; 2057 2058 2059 2060 var conversations = $('#conversations').prop('checked'); 2061 2062 var history = $('#history').prop('checked'); 2063 2064 var r_articles = $('#r_articles').prop('checked'); 2065 2066 var signed_in = $('#signed_in').prop('checked'); 2067 2068 var archive = $('#archive').prop('checked'); 2069 2070 $(".error_message").remove(); 2071 2072 //alert(os_stirfri_check); 2073 2074 2075 2076 2077 2078 if(count_bug == 0) 2079 2080 { 2081 2082 //alert(email); 2083 2084 $.post("others-next.php",{conversations:conversations,history:history,r_articles:r_articles,signed_in:signed_in,archive:archive},function(result){ 2085 2086 //alert(result); 2087 2088 if(result == 1) 2089 2090 { 2091 2092 $("#o_settings_form").append("<span id = 'update' style='color: rgba(228,99,143,.9);'>Settings successfully updated.</span>"); 2093 2094 setTimeout(function(){ $('#update').fadeOut();$('#update').remove(); }, 3000); 2095 2096 window.location.reload(); 2097 2098 } 2099 2100 2101 2102 }); 2103 2104 } 2105 2106 else 2107 2108 { 2109 2110 event.stopPropagation(); 2111 2112 event.preventDefault(); 2113 2114 return false; 2115 2116 } 2117 2118 2119 2120 }); 2121 2122 2123 2124 //Change Others settings End 2125 2126 2127 2128 //Reset Preference settings Start 2129 2130 2131 2132 $(document).on('click','#cancel_preference',function() 2133 2134 { 2135 2136 window.location.reload(); 2137 2138 2139 2140 }); 2141 2142 2143 2144 //Reset Preference settings End 2145 2146 2147 2148 //Change Preference settings Start 2149 2150 $(document).on('click','#tick_preference',function() 2151 2152 { 2153 2154 var count_bug=0; 2155 2156 var preference_s = multiple_values('preference_s'); 2157 2158 $("#preference_res").find('.error_message').remove(); 2159 2160 if(preference_s == '') 2161 2162 { 2163 2164 //alert('Please select any one preference'); 2165 2166 /*$("#preference_res").append("<span class='error_message' id = 'update'>Please select any one preference.</span>"); 2167 2168 count_bug+=1;*/ 2169 2170 count_bug = 0 2171 2172 } 2173 2174 if(count_bug == 0) 2175 2176 { 2177 2178 $.post("preference-next.php",{preference_s:preference_s},function(result){ 2179 2180 if(result == 1) 2181 2182 { 2183 2184 /*$("#preference_res").append("<span id = 'update' style='color: rgba(228,99,143,.9);'>Preference successfully Saved.</span>"); 2185 2186 setTimeout(function(){ $('#update').fadeOut();$('#update').remove(); }, 3000); 2187 2188 window.location.reload();*/ 2189 2190 2191 2192 $('#prefrence_popup').attr('style','display: block !important'); 2193 2194 } 2195 2196 2197 2198 }); 2199 2200 } 2201 2202 else 2203 2204 { 2205 2206 event.stopPropagation(); 2207 2208 event.preventDefault(); 2209 2210 return false; 2211 2212 } 2213 2214 }); 2215 2216 2217 2218 //Change Preference settings End 2219 2220 2221 2222 2223 2224 //Change Preference settings Start For Header 2225 2226 $(document).on('click','#tick_preference_head',function() 2227 2228 { 2229 2230 var count_bug=0; 2231 2232 var preference_s = multiple_values('preference_head'); 2233 2234 if(preference_s == '') 2235 2236 { 2237 2238 alert('Please select any one preference'); 2239 2240 count_bug+=1; 2241 2242 } 2243 2244 if(count_bug == 0) 2245 2246 { 2247 2248 $.post("preference-next.php",{preference_s:preference_s},function(result){ 2249 2250 if(result == 1) 2251 2252 { 2253 2254 //$("#prefrence_popup").show(); 2255 2256 $('#prefrence_popup').attr('style','display: block !important'); 2257 2258 $('.pop_container').attr('style','display: block !important'); 2259 2260 2261 2262 //$("#prefrence_popup").css("display", "block !important"); 2263 2264 $("#stirring_popup").css("display", "none"); 2265 2266 //$("#preference_res_stir").append("<span id = 'update' style='color: rgba(228,99,143,.9);'>Preference successfully Saved.</span>"); 2267 2268 //setTimeout(function(){ $('#update').fadeOut();$('#update').remove(); }, 3000); 2269 2270 //window.location.reload(); 2271 2272 } 2273 2274 2275 2276 }); 2277 2278 } 2279 2280 else 2281 2282 { 2283 2284 event.stopPropagation(); 2285 2286 event.preventDefault(); 2287 2288 return false;
2289 2290 } 2291 2292 }); 2293 2294 2295 2296 //Change Preference settings End For Header 2297 2298 2299 2300 //Bookmark Tooltip Start 2301 2302 2303 2304 /*$('.bookmark_icon i').click(function(){ 2305 2306 $('<div class="bookmark_sucessful_tooltip"><strong>Dear Vipan,</strong> this article has been saved to your bookmarks, you will always find it in your profile.</div>').appendTo(this).parent('.bookmark_icon'); 2307 2308 $(this).find('div.bookmark_sucessful_tooltip').fadeIn().delay(1000).fadeOut('fast'); 2309 2310 // changeTooltipPosition(event); 2311 2312 2313 2314 2315 2316 })*/ 2317 2318 //Bookmark Tooltip End 2319 2320 2321 2322 2323 2324 //Bookmark Saved Start 2325 2326 2327 2328 $(document).on('click','.bookmark_saved',function() 2329 2330 { 2331 2332 var Str = $(this).attr('id'); 2333 2334 var id = Str.replace(/b/g, ''); 2335 2336 var temp = 1; 2337 2338 $.ajax({ 2339 2340 type:'POST', 2341 2342 data:{id:id,temp:temp}, 2343 2344 url:'ajax_bookmark.php', 2345 2346 success:function(result) 2347 2348 { 2349 2350 //alert(result); 2351 2352 $('#'+Str).append(result); 2353 2354 $('#'+Str).parent('.bookmark_icon').addClass('active'); 2355 2356 $('#'+Str).addClass('bookmark_unsaved').removeClass('bookmark_saved'); 2357 2358 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2359 2360 var url = window.location.pathname; 2361 2362 var filename = url.substring(url.lastIndexOf('/')+1); 2363 2364 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php') || (filename == 'author1.php')) 2365 2366 { 2367 2368 setTimeout(function(){ 2369 2370 window.location.reload(); 2371 2372 }, 2000); 2373 2374 } 2375 2376 } 2377 2378 }); 2379 2380 }); 2381 2382 2383 2384 //Bookmark Saved End 2385 2386 2387 2388 //Bookmark Un Saved Start 2389 2390 2391 2392 $(document).on('click','.bookmark_unsaved',function() 2393 2394 { 2395 2396 var Str = $(this).attr('id'); 2397 2398 var id = Str.replace(/b/g, '') 2399 2400 var temp = 2; 2401 2402 $.ajax({ 2403 2404 type:'POST', 2405 2406 data:{id:id,temp:temp}, 2407 2408 url:'ajax_bookmark.php', 2409 2410 success:function(result) 2411 2412 { 2413 2414 //alert(); 2415 2416 $('#'+Str).append(result); 2417 2418 $('#'+Str).parent('.bookmark_icon').removeClass('active'); 2419 2420 $('#'+Str).addClass('bookmark_saved').removeClass('bookmark_unsaved'); 2421 2422 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2423 2424 var url = window.location.pathname; 2425 2426 var filename = url.substring(url.lastIndexOf('/')+1); 2427 2428 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php') || (filename == 'author1.php')) 2429 2430 { 2431 2432 setTimeout(function(){ 2433 2434 window.location.reload(); 2435 2436 }, 2000); 2437 2438 } 2439 2440 } 2441 2442 }); 2443 2444 }); 2445 2446 2447 2448 //Bookmark Un Saved End 2449 2450 2451 2452 //Bookmark Remove Start 2453 2454 2455 2456 $(document).on('click','.bookmark_remove',function() 2457 2458 { 2459 2460 var id = $(this).attr('id'); 2461 2462 var temp = 2; 2463 2464 $.ajax({ 2465 2466 type:'POST', 2467 2468 data:{id:id,temp:temp}, 2469 2470 url:'ajax_bookmark.php', 2471 2472 success:function(result) 2473 2474 { 2475 2476 $('#'+id).append(result); 2477 2478 setTimeout(function(){ $('#article_bookmark'+id).fadeOut();$('#article_bookmark'+id).remove(); }, 2000); 2479 2480 var url = window.location.pathname; 2481 2482 var filename = url.substring(url.lastIndexOf('/')+1); 2483 2484 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 2485 2486 { 2487 2488 setTimeout(function(){ 2489 2490 window.location.reload(); 2491 2492 }, 2000); 2493 2494 } 2495 2496 } 2497 2498 }); 2499 2500 }); 2501 2502 2503 2504 //Bookmark Remove End 2505 2506 2507 2508 //Bookmark Saved Start For Recomended Desktop 2509 2510 2511 2512 $(document).on('click','.bookmark_saved_r',function() 2513 2514 { 2515 2516 var r_id = $(this).attr('id'); 2517 2518 var id = r_id.replace('r', ''); 2519 2520 //alert(id); 2521 2522 var temp = 1; 2523 2524 $.ajax({ 2525 2526 type:'POST', 2527 2528 data:{id:id,temp:temp}, 2529 2530 url:'ajax_bookmark.php', 2531 2532 success:function(result) 2533 2534 { 2535 2536 //alert(result); 2537 2538 $('#r'+id).append(result); 2539 2540 $('#r'+id).parent('.bookmark_icon').addClass('active'); 2541 2542 $('#r'+id).addClass('bookmark_unsaved_r').removeClass('bookmark_saved_r'); 2543 2544 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2545 2546 var url = window.location.pathname; 2547 2548 var filename = url.substring(url.lastIndexOf('/')+1); 2549 2550 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 2551 2552 { 2553 2554 setTimeout(function(){ 2555 2556 window.location.reload(); 2557 2558 }, 2000); 2559 2560 } 2561 2562 } 2563 2564 }); 2565 2566 }); 2567 2568 2569 2570 //Bookmark Saved End For Recomended Desktop 2571 2572 2573 2574 //Bookmark Un Saved Start For Recomended Desktop 2575 2576 2577 2578 $(document).on('click','.bookmark_unsaved_r',function() 2579 2580 { 2581 2582 var r_id = $(this).attr('id'); 2583 2584 var id = r_id.replace('r', ''); 2585 2586 var temp = 2; 2587 2588 $.ajax({ 2589 2590 type:'POST', 2591 2592 data:{id:id,temp:temp}, 2593 2594 url:'ajax_bookmark.php', 2595 2596 success:function(result) 2597 2598 { 2599 2600 //alert(); 2601 2602 $('#r'+id).append(result); 2603 2604 $('#r'+id).parent('.bookmark_icon').removeClass('active'); 2605 2606 $('#r'+id).addClass('bookmark_saved_r').removeClass('bookmark_unsaved_r'); 2607 2608 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2609 2610 var url = window.location.pathname; 2611 2612 var filename = url.substring(url.lastIndexOf('/')+1); 2613 2614 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 2615 2616 { 2617 2618 setTimeout(function(){ 2619 2620 window.location.reload(); 2621 2622 }, 2000); 2623 2624 } 2625 2626 } 2627 2628 }); 2629 2630 }); 2631 2632 2633 2634 //Bookmark Un Saved End For Recomended Desktop 2635 2636 2637 2638 //Bookmark Saved Start For Recomended Mobile 2639 2640 2641 2642 $(document).on('click','.bookmark_saved_rm',function() 2643 2644 { 2645 2646 var r_id = $(this).attr('id'); 2647 2648 var id = r_id.replace('rm', ''); 2649 2650 //alert(id); 2651 2652 var temp = 1; 2653 2654 $.ajax({ 2655 2656 type:'POST', 2657 2658 data:{id:id,temp:temp}, 2659 2660 url:'ajax_bookmark.php', 2661 2662 success:function(result) 2663 2664 { 2665 2666 //alert(result); 2667 2668 $('#rm'+id).append(result); 2669 2670 $('#rm'+id).parent('.bookmark_icon').addClass('active'); 2671 2672 $('#rm'+id).addClass('bookmark_unsaved_rm').removeClass('bookmark_saved_rm'); 2673 2674 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2675 2676 var url = window.location.pathname; 2677 2678 var filename = url.substring(url.lastIndexOf('/')+1); 2679 2680 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 2681 2682 { 2683 2684 setTimeout(function(){ 2685 2686 window.location.reload(); 2687 2688 }, 2000); 2689 2690 } 2691 2692 } 2693 2694 }); 2695 2696 }); 2697 2698 2699 2700 //Bookmark Saved End For Recomended Mobile 2701 2702 2703 2704 //Bookmark Un Saved Start For Recomended Mobile 2705 2706 2707 2708 $(document).on('click','.bookmark_unsaved_rm',function() 2709 2710 { 2711 2712 var r_id = $(this).attr('id'); 2713 2714 var id = r_id.replace('rm', ''); 2715 2716 var temp = 2; 2717 2718 $.ajax({ 2719 2720 type:'POST', 2721 2722 data:{id:id,temp:temp}, 2723 2724 url:'ajax_bookmark.php', 2725 2726 success:function(result) 2727 2728 { 2729 2730 //alert(); 2731 2732 $('#rm'+id).append(result); 2733 2734 $('#rm'+id).parent('.bookmark_icon').removeClass('active'); 2735 2736 $('#rm'+id).addClass('bookmark_saved_rm').removeClass('bookmark_unsaved_rm'); 2737 2738 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2739 2740 var url = window.location.pathname; 2741 2742 var filename = url.substring(url.lastIndexOf('/')+1); 2743 2744 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 2745 2746 { 2747 2748 setTimeout(function(){ 2749 2750 window.location.reload(); 2751 2752 }, 2000); 2753 2754 } 2755 2756 } 2757 2758 }); 2759 2760 }); 2761 2762 2763 2764 //Bookmark Un Saved End For Recomended Mobile 2765 2766 2767 2768 //Bookmark Saved Start For History 2769 2770 2771 2772 $(document).on('click','.bookmark_saved_h',function() 2773 2774 { 2775
2776 var h_id = $(this).attr('id'); 2777 2778 var s_id = h_id.split('_'); 2779 2780 var id = s_id[1]; 2781 2782 var start = s_id[0]; 2783 2784 //alert(id); 2785 2786 var temp = 1; 2787 2788 $.ajax({ 2789 2790 type:'POST', 2791 2792 data:{id:id,temp:temp}, 2793 2794 url:'ajax_bookmark.php', 2795 2796 success:function(result) 2797 2798 { 2799 2800 2801 2802 //alert(result); 2803 2804 //alert('#'+start+id); 2805 2806 $('#'+h_id).append(result); 2807 2808 $('#'+h_id).parent('.bookmark_icon').addClass('active'); 2809 2810 $('#'+h_id).addClass('bookmark_unsaved_h').removeClass('bookmark_saved_h'); 2811 2812 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2813 2814 var url = window.location.pathname; 2815 2816 var filename = url.substring(url.lastIndexOf('/')+1); 2817 2818 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 2819 2820 { 2821 2822 setTimeout(function(){ 2823 2824 window.location.reload(); 2825 2826 }, 2000); 2827 2828 } 2829 2830 } 2831 2832 }); 2833 2834 }); 2835 2836 2837 2838 //Bookmark Saved End For History 2839 2840 2841 2842 //Bookmark Un Saved Start For History 2843 2844 2845 2846 $(document).on('click','.bookmark_unsaved_h',function() 2847 2848 { 2849 2850 var h_id = $(this).attr('id'); 2851 2852 var s_id = h_id.split('_'); 2853 2854 var id = s_id[1]; 2855 2856 var start = s_id[0]; 2857 2858 var temp = 2; 2859 2860 $.ajax({ 2861 2862 type:'POST', 2863 2864 data:{id:id,temp:temp}, 2865 2866 url:'ajax_bookmark.php', 2867 2868 success:function(result) 2869 2870 { 2871 2872 //alert(); 2873 2874 $('#'+h_id).append(result); 2875 2876 $('#'+h_id).parent('.bookmark_icon').removeClass('active'); 2877 2878 $('#'+h_id).addClass('bookmark_saved_h').removeClass('bookmark_unsaved_h'); 2879 2880 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2881 2882 var url = window.location.pathname; 2883 2884 var filename = url.substring(url.lastIndexOf('/')+1); 2885 2886 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 2887 2888 { 2889 2890 setTimeout(function(){ 2891 2892 window.location.reload(); 2893 2894 }, 2000); 2895 2896 } 2897 2898 } 2899 2900 }); 2901 2902 }); 2903 2904 2905 2906 //Bookmark Un Saved End For History 2907 2908 2909 2910 //Bookmark Saved Start For Comment 2911 2912 2913 2914 $(document).on('click','.bookmark_saved_c',function() 2915 2916 { 2917 2918 var c_id = $(this).attr('id'); 2919 2920 var id = c_id.replace('c', ''); 2921 2922 //alert(id); 2923 2924 var temp = 1; 2925 2926 $.ajax({ 2927 2928 type:'POST', 2929 2930 data:{id:id,temp:temp}, 2931 2932 url:'ajax_bookmark.php', 2933 2934 success:function(result) 2935 2936 { 2937 2938 //alert(result); 2939 2940 $('#c'+id).append(result); 2941 2942 $('#c'+id).parent('.bookmark_icon').addClass('active'); 2943 2944 $('#c'+id).addClass('bookmark_unsaved_c').removeClass('bookmark_saved_c'); 2945 2946 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 2947 2948 var url = window.location.pathname; 2949 2950 var filename = url.substring(url.lastIndexOf('/')+1); 2951 2952 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 2953 2954 { 2955 2956 setTimeout(function(){ 2957 2958 window.location.reload(); 2959 2960 }, 2000); 2961 2962 } 2963 2964 } 2965 2966 }); 2967 2968 }); 2969 2970 2971 2972 //Bookmark Saved End For Comment 2973 2974 2975 2976 //Bookmark Un Saved Start For Comment 2977 2978 2979 2980 $(document).on('click','.bookmark_unsaved_c',function() 2981 2982 { 2983 2984 var c_id = $(this).attr('id'); 2985 2986 var id = c_id.replace('c', ''); 2987 2988 var temp = 2; 2989 2990 $.ajax({ 2991 2992 type:'POST', 2993 2994 data:{id:id,temp:temp}, 2995 2996 url:'ajax_bookmark.php', 2997 2998 success:function(result) 2999 3000 { 3001 3002 //alert(); 3003 3004 $('#c'+id).append(result); 3005 3006 $('#c'+id).parent('.bookmark_icon').removeClass('active'); 3007 3008 $('#c'+id).addClass('bookmark_saved_c').removeClass('bookmark_unsaved_c'); 3009 3010 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 2000); 3011 3012 var url = window.location.pathname; 3013 3014 var filename = url.substring(url.lastIndexOf('/')+1); 3015 3016 if((filename == 'profile-settings.php') || (filename == 'profile-settings-history.php')) 3017 3018 { 3019 3020 setTimeout(function(){ 3021 3022 window.location.reload(); 3023 3024 }, 2000); 3025 3026 } 3027 3028 } 3029 3030 }); 3031 3032 }); 3033 3034 3035 3036 //Bookmark Un Saved End For Comment 3037 3038 3039 3040 //Reset Filters Start 3041 3042 3043 3044 $(document).on('click','#reset_filter',function() 3045 3046 { 3047 3048 //alert(); 3049 3050 /*$(".preference"). prop("checked", false); 3051 3052 $(".location"). prop("checked", false); 3053 3054 $(".kind"). prop("checked", false); 3055 3056 $(".purpose"). prop("checked", false); 3057 3058 //$("#preference_h").find('option:first-child').prop('selected', true).end().trigger('chosen:updated'); 3059 3060 //$("#preference_h").selectpicker("refresh"); 3061 3062 $("#location_h").val(''); 3063 3064 $("#location_h").selectpicker("refresh"); 3065 3066 $("#medium_h").val(''); 3067 3068 $("#medium_h").selectpicker("refresh");*/ 3069 3070 $('.pref_remove').remove(); 3071 3072 $('#preference_h').parent().removeClass('selected'); 3073 3074 $("#preference_h").val('').trigger("liszt:updated"); 3075 3076 3077 3078 3079 3080 $('.loc_remove').remove(); 3081 3082 $('#location_h').parent().addClass('selected'); 3083 3084 $("#location_h").val('').trigger("liszt:updated"); 3085 3086 3087 3088 $('.med_remove').remove(); 3089 3090 $('#medium_h').parent().addClass('selected'); 3091 3092 $("#medium_h").val('').trigger("liszt:updated"); 3093 3094 }); 3095 3096 3097 3098 //Reset Filters End 3099 3100 3101 3102 3103 3104 //Apply Filters Start 3105 3106 $(document).on('click','#apply_filter',function() 3107 3108 { 3109 3110 //alert(); 3111 3112 var preference_s = $('#preference_h').find(":selected").val(); 3113 3114 var location_s = $('#location_h').find(":selected").val(); 3115 3116 var medium_s = $('#medium_h').find(":selected").val(); 3117 3118 //var purpose_s = $('#purpose_h').find(":selected").val(); 3119 3120 //alert(preference_s); 3121 3122 //alert(location_s); 3123 3124 //alert(medium_s); 3125 3126 if((preference_s == '') && (location_s == '') && (medium_s == '') ) 3127 3128 { 3129 3130 var pref = getUrlParameter('category'); 3131 3132 var loc = getUrlParameter('location'); 3133
3134 var kd = getUrlParameter('medium'); 3135 3136 $('#preference_h').val(pref); 3137 3138 $('#location_h').val(loc); 3139 3140 $('#medium_h').val(kd); 3141 3142 3143 3144 alert('One filter must be selected'); 3145 3146 event.stopPropagation(); 3147 3148 event.preventDefault(); 3149 3150 return false; 3151 3152 } 3153 3154 else 3155 3156 { 3157 3158 //alert('url'); 3159 3160 var url = 'filters-results.php?' 3161 3162 if(preference_s != '') 3163 3164 { 3165 3166 url = url + 'category=' + preference_s; 3167 3168 } 3169 3170 if(location_s != '') 3171 3172 { 3173 3174 url = url + '&location=' + location_s; 3175 3176 } 3177 3178 if(medium_s != '') 3179 3180 { 3181 3182 url = url + '&medium=' + medium_s; 3183 3184 } 3185 3186 /*if(purpose_s != '') 3187 3188 { 3189 3190 url = url + '&purpose=' + purpose_s; 3191 3192 }*/ 3193 3194 //$('#filters_form').attr('action',url); 3195 3196 //$('#filters_form').submit(); 3197 3198 3199 3200 window.location = url; 3201 3202 3203 3204 /*$.post("filters-results.php",{preference_s:preference_s,location_s:location_s,kind_s:kind_s,purpose_s:purpose_s},function(result){ 3205 3206 setTimeout(function(){ }, 2000); 3207 3208 3209 3210 });*/ 3211 3212 } 3213 3214 }); 3215 3216 3217 3218 //Apply Filters End 3219 3220 3221 3222 3223 3224 //Remove Filter Start 3225 3226 $(document).on('click','.prefrences_r',function() 3227 3228 { 3229 3230 //alert(); 3231 3232 //var id = $(this).attr('id'); 3233 3234 //var str = id.split("$"); 3235 3236 //alert(str[0]); 3237 3238 //$('#'+str[0]+'p').click(); 3239 3240 $('#preference_h').val(''); 3241 3242 $('#apply_filter').click(); 3243 3244 }); 3245 3246 3247 3248 $(document).on('click','.location_r',function() 3249 3250 { 3251 3252 /*var id = $(this).attr('id'); 3253 3254 var str = id.split("$"); 3255 3256 //alert(id); 3257 3258 $('#'+str[0]+'l').click();*/ 3259 3260 $('#location_h').val(''); 3261 3262 $('#apply_filter').click(); 3263 3264 }); 3265 3266 3267 3268 $(document).on('click','.kind_r',function() 3269 3270 { 3271 3272 /*var id = $(this).attr('id'); 3273 3274 var str = id.split("$"); 3275 3276 //alert(id); 3277 3278 $('#'+str[0]).click();*/ 3279 3280 $('#medium_h').val(''); 3281 3282 $('#apply_filter').click(); 3283 3284 }); 3285 3286 3287 3288 $(document).on('click','.purpose_r',function() 3289 3290 { 3291 3292 var id = $(this).attr('id'); 3293 3294 var str = id.split("$"); 3295 3296 //alert(id); 3297 3298 $('.'+str[0]).click(); 3299 3300 $('#apply_filter').click(); 3301 3302 }); 3303 3304 3305 3306 //Remove Filter End 3307 3308 3309 3310 3311 3312 //News letter subscription Start 3313 3314 $(document).on('click','#newsletter_subscriber',function() 3315 3316 { 3317 3318 event.preventDefault(); 3319 3320 var news_email = $('.news_email').val(); 3321 3322 $('#news_letter_form').find('.error_message').remove(); 3323 3324 if (news_email == "") 3325 3326 { 3327 3328 $("#news_letter_form").append("<span class='error_message' id = 'update'>Email Can't be empty.</span>"); 3329 3330 setTimeout(function(){ $('#update').fadeOut();$('#update').remove(); }, 3000); 3331 3332 news_email.focus(); 3333 3334 if(eval(count_bug)==0) 3335 3336 count_bug+=1; 3337 3338 } 3339 3340 else 3341 3342 { 3343 3344 3345 3346 var emailIn = news_email; 3347 3348 3349 3350 var check_email = check_email_now(emailIn); 3351 3352 3353 3354 if(check_email == false) 3355 3356 { 3357 3358 $("#news_letter_form").append("<span id = 'update' class='error_message'>Invalid Email Id</span>"); 3359 3360 setTimeout(function(){ $('#update').fadeOut();$('#update').remove(); }, 3000); 3361 3362 news_email.focus(); 3363 3364 if(eval(count_bug)==0) 3365 3366 count_bug+=1; 3367 3368 } 3369 3370 } 3371 3372 var count_bug=0; 3373 3374 if(count_bug == 0) 3375 3376 { 3377 3378 $.post("subscriber-next.php",{news_email:news_email},function(result){ 3379 3380 //alert(result); 3381 3382 if(result == 1) 3383 3384 { 3385 3386 $("#news_letter_form").append("<span id = 'update' style='color: rgba(228,99,143,.9);'>You have been subscribed succesfully for updates!!.</span>"); 3387 3388 setTimeout(function(){ $('#update').fadeOut();$('#update').remove(); }, 3000); 3389 3390 $('.news_email').val(''); 3391 3392 } 3393 3394 else 3395 3396 { 3397 3398 $("#news_letter_form").append("<span id = 'update' class='error_message'>You already have been subscribed for our updates!!.</span>"); 3399 3400 setTimeout(function(){ $('#update').fadeOut();$('#update').remove(); }, 3000); 3401 3402 } 3403 3404 3405 3406 }); 3407 3408 } 3409 3410 else 3411 3412 { 3413 3414 event.stopPropagation(); 3415 3416 event.preventDefault(); 3417 3418 return false; 3419 3420 } 3421 3422 }); 3423 3424 3425 3426 //News letter subscription End 3427 3428 3429 3430 //For Header Section Start 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 //For Search Result Page Start 3446 3447 3448 3449 if($('body').hasClass('search_checker')) 3450 3451 { 3452 3453 //Autocomplete Start 3454 3455 3456 3457 $(function(){ 3458 3459 /*$( "#project_s" ).autocomplete({ 3460 3461 delay:0, 3462 3463 minLength: 1, 3464 3465 source: "search.php", 3466 3467 focus: function( event, ui ) { 3468 3469 $( "#project_s" ).val( ui.item.label ); 3470 3471 return false;
3472 3473 }, 3474 3475 select: function( event, ui ) { 3476 3477 $( "#project_s" ).val( ui.item.label ); 3478 3479 if($( "#project_s" ).val( ui.item.label )) 3480 3481 { 3482 3483 $('#button_s').click(); 3484 3485 } 3486 3487 return false; 3488 3489 } 3490 3491 }) 3492 3493 .autocomplete( "instance" )._renderItem = function( ul, item ) { 3494 3495 return $( "<li>" ) 3496 3497 .append( "<div>" + item.desc + item.label + "</div>" ) 3498 3499 .appendTo( ul ) 3500 3501 };*/ 3502 3503 $( "#project_s" ).catcomplete({ 3504 3505 delay: 0, 3506 3507 minLength: 2, 3508 3509 source: 'search.php', 3510 3511 }).catcomplete( "instance" )._renderItem = function( ul, item ) { 3512 3513 var txt = String(item.value).replace(new RegExp(this.term, "gi"),"<b>$&</b>"); 3514 3515 3516 3517 /*Find Device start here*/ 3518 3519 3520 3521 if($(window).width() < 767) 3522 3523 { 3524 3525 var device_type = "Mobile"; 3526 3527 } 3528 3529 else 3530 3531 { 3532 3533 device_type = "Desktop"; 3534 3535 } 3536 3537 3538 3539 /*Find Device end here*/ 3540 3541 3542 3543 return $("<li class='d-flex align-items-center search_list justify-content-start '></li>") 3544 3545 .data("ui-autocomplete-item", item) 3546 3547 .append("<a href='"+item.slug+"' onClick='gtag('event', 'click', { 'event_category': 'STIRworld Search - Autosuggestion - utm ("+device_type+")', 'event_label': 'Search - "+item.slug+"'});'><span class='item_data'>" + txt + "</span></a>") 3548 3549 .appendTo(ul); 3550 3551 3552 3553 }; 3554 3555 3556 3557 }); 3558 3559 3560 3561 //Autocomplete End 3562 3563 } 3564 3565 3566 3567 3568 3569 //Search Engine Start 3570 3571 $('#project_s').keypress(function (e) { 3572 3573 //$('#project_s').keyup(function (e) { 3574 3575 var s = encodeURIComponent($.trim($('#project_s').val())); 3576 3577 /*if(s == '') 3578 3579 { 3580 3581 $('.cross_btn').hide(); 3582 3583 } 3584 3585 else 3586 3587 { 3588 3589 $('.cross_btn').show(); 3590 3591 }*/ 3592 3593 if (e.which == 13) 3594 3595 { 3596 3597 if(s.length <= 1) 3598 3599 { 3600 3601 event.stopPropagation(); 3602 3603 event.preventDefault(); 3604 3605 return false; 3606 3607 } 3608 3609 else 3610 3611 { 3612 3613 var temp = 1; 3614 3615 $.post("csv-next.php",{s:s,temp:temp},function(result){ 3616 3617 var url = 'search-result.php?s='+s; 3618 3619 window.location = url; 3620 3621 }); 3622 3623 } 3624 3625 } 3626 3627 3628 3629 }); 3630 3631 //Search Engine End 3632 3633 3634 3635 //Search button Start 3636 3637 $(document).on('click','#button_s',function() 3638 3639 { 3640 3641 $(function() { 3642 3643 var e = $.Event('keypress'); 3644 3645 e.which = 13; // Character 'A' 3646 3647 $('#project_s').trigger(e); 3648 3649 }); 3650 3651 }); 3652 3653 /*$(document).on('click','#project_s',function() 3654 3655 { 3656 3657 var s = encodeURIComponent($.trim($('#project_s').val())); 3658 3659 if(s == '') 3660 3661 { 3662 3663 //do nothing 3664 3665 } 3666 3667 else 3668 3669 { 3670 3671 $( "#ui-id-2" ).css({"display": "block"}); 3672 3673 } 3674 3675 });*/ 3676 3677 //Search button End 3678 3679 $(document).on('click','#button_c',function() 3680 3681 { 3682 3683 //$('.custom_search').removeClass('d-none'); 3684 3685 setTimeout(function(){ $('.custom_search').removeClass('d-none'); }, 10); 3686 3687 $('#project_s').val(''); 3688 3689 $('.cross_btn').hide(); 3690 3691 $('#project_s').focus(); 3692 3693 $('.text_anim').show(); 3694 3695 }); 3696 3697 $(document).on('click','#button_ch',function() 3698 3699 { 3700 3701 $('#project').val(''); 3702 3703 $('.cross_btn').hide(); 3704 3705 $('#project').focus(); 3706 3707 $('.text_anim').show(); 3708 3709 $('.custom_search').removeClass('d-none'); 3710 3711 }); 3712 3713 3714 3715 //For Search Result Page End 3716 3717 3718 3719 3720 3721 //Contact Form Start 3722 3723 3724 3725 $('#contact_but').on("click",function() 3726 3727 { 3728 3729 //alert('1'); 3730 3731 event.preventDefault(); 3732 3733 $("#contact_form").find("#contact_but").hide(); 3734 3735 $("#contact_form").append('<span class="loader _w mob_hide"> </span>'); 3736 3737 $("#contact_form").append('<span class="loader _b mob_show"> </span>'); 3738 3739 $("#contact_form").find("#message_c").removeClass("error"); 3740 3741 $("#contact_form").find("#email_c").removeClass("error"); 3742 3743 $("#contact_form").find("#lname_c").removeClass("error"); 3744 3745 $("#contact_form").find("#fname_c").removeClass("error"); 3746 3747 $("#contact_form").find(".error_message").remove(); 3748 3749 //alert('2'); 3750 3751 //alert(document.contact_form.message_c.value) 3752 3753 var count_bug=0; 3754 3755 3756 3757 3758 3759 if (document.contact_form.captcha_response.value=="") 3760 3761 { 3762 3763 $("#contact_form").find("#resp").after("<span class='error_message'>Please check captcha.</span>"); 3764 3765 if(eval(count_bug)==0) 3766 3767 count_bug+=1; 3768 3769 } 3770 3771 if (document.contact_form.message_c.value=="") 3772 3773 { 3774 3775 $("#contact_form").find("#message_c").addClass("error"); 3776 3777 $("#contact_form").find("#message_c").after('<span class="error_message">Required</span>'); 3778 3779 document.contact_form.message_c.focus(); 3780 3781 if(eval(count_bug)==0) 3782 3783 count_bug+=1; 3784 3785 } 3786 3787 3788 3789 if (document.contact_form.email_c.value=="") 3790 3791 { 3792 3793 $("#contact_form").find("#email_c").addClass("error"); 3794 3795 $("#contact_form").find("#email_c").after('<span class="error_message">Required</span>'); 3796 3797 document.contact_form.email_c.focus(); 3798 3799 if(eval(count_bug)==0) 3800 3801 count_bug+=1; 3802 3803 } 3804 3805 else 3806 3807 { 3808 3809 var emailIn = $( "#email_cn" ).val(); 3810 3811 //alert(emailIn); 3812 3813 3814 3815 var check_email = check_email_now(emailIn); 3816 3817 3818 3819 if(check_email == false) 3820 3821 { 3822 3823 $("#contact_form").find("#email_c").addClass("error"); 3824 3825 $("#email_c").parent().append('<span class="error_message">Invalid Email Id</span>'); 3826 3827 //$("#contact_form").find(".error_message").html('Invalid Email Id'); 3828 3829 document.contact_form.email_c.focus(); 3830 3831 count_bug+=1; 3832 3833 } 3834 3835 } 3836 3837 3838 3839 if (document.contact_form.lname_c.value=="") 3840 3841 { 3842 3843 $("#contact_form").find("#lname_c").addClass("error"); 3844 3845 $("#contact_form").find("#lname_c").after('<span class="error_message">Required</span>'); 3846 3847 document.contact_form.lname_c.focus(); 3848 3849 if(eval(count_bug)==0) 3850 3851 count_bug+=1; 3852 3853 } 3854 3855 else 3856 3857 { 3858 3859 var c_lname_c = $( "input[name=lname_c]" ).val(); 3860 3861 var check_c_lname_c = validURL(c_lname_c); 3862 3863 //alert(check_c_lname_c); 3864 3865 if(check_c_lname_c == false) 3866 3867 { 3868 3869 //do nothing 3870 3871 } 3872 3873 else 3874 3875 { 3876 3877 $("#contact_form").find("#lname_c").addClass("error"); 3878 3879 document.contact_form.lname_c.focus(); 3880 3881 if(eval(count_bug)==0) 3882 3883 count_bug+=1; 3884 3885 } 3886 3887 } 3888 3889 3890 3891 if (document.contact_form.fname_c.value=="") 3892 3893 { 3894 3895 $("#contact_form").find("#fname_c").addClass("error"); 3896 3897 $("#contact_form").find("#fname_c").after('<span class="error_message">Required</span>'); 3898 3899 document.contact_form.fname_c.focus(); 3900 3901 if(eval(count_bug)==0) 3902 3903 count_bug+=1; 3904 3905 } 3906 3907 else 3908 3909 { 3910 3911 var c_fname_c = $( "input[name=fname_c]" ).val(); 3912 3913 var check_c_fname_c = validURL(c_fname_c); 3914 3915 //alert(check_c_fname_c); 3916 3917 if(check_c_fname_c == false) 3918 3919 { 3920 3921 //do nothing 3922 3923 } 3924 3925 else 3926 3927 { 3928 3929 $("#contact_form").find("#fname_c").addClass("error"); 3930 3931 document.contact_form.fname_c.focus(); 3932 3933 if(eval(count_bug)==0) 3934 3935 count_bug+=1; 3936 3937 } 3938 3939 } 3940 3941 3942 3943 /*if (document.contact_form.captcha_response.value=="") 3944 3945 { 3946 3947 //$("#resp").css({border:'1px solid #c80909'}); 3948 3949 //$("#resp").css({width:'304px'}); 3950 3951 //$("#resp").css({height:'78px'}); 3952 3953 if(eval(count_bug)==0) 3954 3955 count_bug+=1; 3956 3957 }*/ 3958 3959 3960 3961 if(count_bug == 0) 3962 3963 { 3964 3965 email = document.contact_form.email_c.value; 3966 3967 message = document.contact_form.message_c.value; 3968 3969 lname = document.contact_form.lname_c.value; 3970 3971 fname = document.contact_form.fname_c.value; 3972 3973 captcha_response = document.contact_form.captcha_response.value; 3974 3975 3976 3977 //alert(email); 3978 3979 $.post("contact-next.php",{email:email,message:message,lname:lname,fname:fname,captcha_response:captcha_response},function(result){ 3980 3981 //alert(result); 3982 3983 $("#contact_form").html(result); 3984 3985 //$("#contact_form").find('._w').remove(); 3986 3987 //$("#contact_form").find("#contact_but").show(); 3988 3989 3990 3991 document.contact_form.email_c.value = ''; 3992 3993 document.contact_form.message_c.value = ''; 3994 3995 document.contact_form.lname_c.value = ''; 3996 3997 document.contact_form.fname_c.value = ''; 3998 3999 4000 4001 //setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 4002 4003 }); 4004 4005 } 4006 4007 else 4008 4009 { 4010 4011 //alert('a'); 4012 4013 $("#contact_form").find('._w').remove(); 4014 4015 $("#contact_form").find('._b').remove(); 4016 4017 $("#contact_form").find("#contact_but").show(); 4018 4019 event.stopPropagation(); 4020 4021 event.preventDefault(); 4022 4023 return false;
4024 4025 } 4026 4027 4028 4029 }); 4030 4031 4032 4033 //Contact form End 4034 4035 4036 4037 4038 4039 //Advertise Form Start 4040 4041 4042 4043 $('#advertise_but').on("click",function() 4044 4045 { 4046 4047 event.preventDefault(); 4048 4049 $("#advertise_form").find("#advertise_but").hide(); 4050 4051 $("#advertise_form").append('<span class="loader _w"> </span>'); 4052 4053 $("#advertise_form").find("#message_a").removeClass("error"); 4054 4055 $("#advertise_form").find("#email_a").removeClass("error"); 4056 4057 $("#advertise_form").find("#lname_a").removeClass("error"); 4058 4059 $("#advertise_form").find("#fname_a").removeClass("error"); 4060 4061 $("#advertise_form").find(".error_message").remove(); 4062 4063 //alert(); 4064 4065 var count_bug=0; 4066 4067 if (document.advertise_form.message_a.value=="") 4068 4069 { 4070 4071 $("#advertise_form").find("#message_a").addClass("error"); 4072 4073 $("#advertise_form").find("#message_a").after('<span class="error_message">Required</span>'); 4074 4075 document.advertise_form.message_a.focus(); 4076 4077 if(eval(count_bug)==0) 4078 4079 count_bug+=1; 4080 4081 } 4082 4083 4084 4085 if (document.advertise_form.email_a.value=="") 4086 4087 { 4088 4089 $("#advertise_form").find("#email_a").addClass("error"); 4090 4091 $("#advertise_form").find("#email_a").after('<span class="error_message">Required</span>'); 4092 4093 document.advertise_form.email_a.focus(); 4094 4095 if(eval(count_bug)==0) 4096 4097 count_bug+=1; 4098 4099 } 4100 4101 else 4102 4103 { 4104 4105 var emailIn = $( "#email_an" ).val(); 4106 4107 4108 4109 var check_email = check_email_now(emailIn); 4110 4111 4112 4113 if(check_email == false) 4114 4115 { 4116 4117 $("#advertise_form").find("#email_a").addClass("error"); 4118 4119 $("#email_a").append('<span class="error_message">Invalid Email Id</span>'); 4120 4121 document.advertise_form.email_a.focus(); 4122 4123 count_bug+=1; 4124 4125 } 4126 4127 } 4128 4129 4130 4131 if (document.advertise_form.lname_a.value=="") 4132 4133 { 4134 4135 $("#advertise_form").find("#lname_a").addClass("error"); 4136 4137 $("#advertise_form").find("#lname_a").after('<span class="error_message">Required</span>'); 4138 4139 document.advertise_form.lname_a.focus(); 4140 4141 if(eval(count_bug)==0) 4142 4143 count_bug+=1; 4144 4145 } 4146 4147 4148 4149 if (document.advertise_form.fname_a.value=="") 4150 4151 { 4152 4153 $("#advertise_form").find("#fname_a").addClass("error"); 4154 4155 $("#advertise_form").find("#fname_a").after('<span class="error_message">Required</span>'); 4156 4157 document.advertise_form.fname_a.focus(); 4158 4159 if(eval(count_bug)==0) 4160 4161 count_bug+=1; 4162 4163 } 4164 4165 4166 4167 if(count_bug == 0) 4168 4169 { 4170 4171 email = document.advertise_form.email_a.value; 4172 4173 message = document.advertise_form.message_a.value; 4174 4175 lname = document.advertise_form.lname_a.value; 4176 4177 fname = document.advertise_form.fname_a.value; 4178 4179 //alert(email); 4180 4181 $.post("advertise-next.php",{email:email,message:message,lname:lname,fname:fname},function(result){ 4182 4183 //alert(result); 4184 4185 //$("#advertise_form").find('._w').remove(); 4186 4187 $("#advertise_form").html(result); 4188 4189 //$("#advertise_form").find("#advertise_but").show(); 4190 4191 4192 4193 document.advertise_form.email_a.value = ''; 4194 4195 document.advertise_form.message_a.value = ''; 4196 4197 document.advertise_form.lname_a.value = ''; 4198 4199 document.advertise_form.fname_a.value = ''; 4200 4201 4202 4203 //setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 4204 4205 }); 4206 4207 } 4208 4209 else 4210 4211 { 4212 4213 $("#advertise_form").find('._w').remove(); 4214 4215 $("#advertise_form").find("#advertise_but").show(); 4216 4217 event.stopPropagation(); 4218 4219 event.preventDefault(); 4220 4221 return false; 4222 4223 } 4224 4225 4226 4227 }); 4228 4229 4230 4231 //Advertise form End 4232 4233 4234 4235 4236 4237 //Partner Form Start 4238 4239 4240 4241 $('#partner_but').on("click",function() 4242 4243 { 4244 4245 event.preventDefault(); 4246 4247 $("#partner_form").find("#partner_but").hide(); 4248 4249 $("#partner_form").append('<span class="loader _b"> </span>'); 4250 4251 $("#partner_form").find("#message_p").removeClass("error"); 4252 4253 $("#partner_form").find("#profession_p").removeClass("error"); 4254 4255 $("#partner_form").find("#email_p").removeClass("error"); 4256 4257 $("#partner_form").find("#lname_p").removeClass("error"); 4258 4259 $("#partner_form").find("#fname_p").removeClass("error"); 4260 4261 $("#partner_form").find(".error_message").remove(); 4262 4263 //alert(); 4264 4265 var count_bug=0; 4266 4267 if (document.partner_form.message_p.value=="") 4268 4269 { 4270 4271 $("#partner_form").find("#message_p").addClass("error"); 4272 4273 $("#partner_form").find("#message_p").after('<span class="error_message">Required</span>'); 4274 4275 document.partner_form.message_p.focus(); 4276 4277 if(eval(count_bug)==0) 4278 4279 count_bug+=1; 4280 4281 } 4282 4283 4284 4285 if (document.partner_form.profession_p.value=="") 4286 4287 { 4288 4289 $("#partner_form").find("#profession_p").addClass("error"); 4290 4291 $("#partner_form").find("#profession_p").after('<span class="error_message">Required</span>'); 4292 4293 document.partner_form.profession_p.focus(); 4294 4295 if(eval(count_bug)==0) 4296 4297 count_bug+=1; 4298 4299 } 4300 4301 4302 4303 if (document.partner_form.email_p.value=="") 4304 4305 { 4306 4307 $("#partner_form").find("#email_p").addClass("error"); 4308 4309 $("#partner_form").find("#email_p").after('<span class="error_message">Required</span>'); 4310 4311 document.partner_form.email_pn.focus(); 4312 4313 if(eval(count_bug)==0) 4314 4315 count_bug+=1; 4316 4317 } 4318 4319 else 4320 4321 { 4322 4323 var emailIn = $( "#email_pn" ).val(); 4324 4325 //alert(emailIn); 4326 4327 4328 4329 var check_email = check_email_now(emailIn); 4330 4331 4332 4333 if(check_email == false) 4334 4335 { 4336 4337 $("#partner_form").find("#email_p").addClass("error"); 4338 4339 $("#email_p").append('<span class="error_message">Invalid Email Id</span>'); 4340 4341 //$("#partner_form").find(".error_message").html('Invalid Email Id'); 4342
4343 //setTimeout(function(){ $('.invalid-tooltip').fadeOut();$('.invalid-tooltip').remove(); }, 3000); 4344 4345 document.partner_form.email_pn.focus(); 4346 4347 count_bug+=1; 4348 4349 } 4350 4351 } 4352 4353 4354 4355 if (document.partner_form.lname_p.value=="") 4356 4357 { 4358 4359 $("#partner_form").find("#lname_p").addClass("error"); 4360 4361 $("#partner_form").find("#lname_p").after('<span class="error_message">Required</span>'); 4362 4363 document.partner_form.lname_p.focus(); 4364 4365 if(eval(count_bug)==0) 4366 4367 count_bug+=1; 4368 4369 } 4370 4371 4372 4373 if (document.partner_form.fname_p.value=="") 4374 4375 { 4376 4377 $("#partner_form").find("#fname_p").addClass("error"); 4378 4379 $("#partner_form").find("#fname_p").after('<span class="error_message">Required</span>'); 4380 4381 document.partner_form.fname_p.focus(); 4382 4383 if(eval(count_bug)==0) 4384 4385 4386 4387 count_bug+=1; 4388 4389 } 4390 4391 4392 4393 if(count_bug == 0) 4394 4395 { 4396 4397 email = document.partner_form.email_p.value; 4398 4399 message = document.partner_form.message_p.value; 4400 4401 profession = document.partner_form.profession_p.value; 4402 4403 lname = document.partner_form.lname_p.value; 4404 4405 fname = document.partner_form.fname_p.value; 4406 4407 //alert(email); 4408 4409 $.post("partner-next.php",{email:email,message:message,lname:lname,fname:fname,profession:profession},function(result){ 4410 4411 //alert(result); 4412 4413 $("#partner_form").html(result); 4414 4415 //$("#partner_form").find('._b').remove(); 4416 4417 //$("#partner_form").find("#partner_but").show(); 4418 4419 4420 4421 document.partner_form.email_p.value = ''; 4422 4423 document.partner_form.message_p.value = ''; 4424 4425 document.partner_form.profession_p.value = ''; 4426 4427 document.partner_form.lname_p.value = ''; 4428 4429 document.partner_form.fname_p.value = ''; 4430 4431 4432 4433 //setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 4434 4435 }); 4436 4437 } 4438 4439 else 4440 4441 { 4442 4443 $("#partner_form").find('._b').remove(); 4444 4445 $("#partner_form").find("#partner_but").show(); 4446 4447 event.stopPropagation(); 4448 4449 event.preventDefault(); 4450 4451 return false; 4452 4453 } 4454 4455 4456 4457 }); 4458 4459 4460 4461 //Partner form End 4462 4463 4464 4465 4466 4467 //Newsroom Form Start 4468 4469 4470 4471 $('#newsroom_but').on("click",function() 4472 4473 { 4474 4475 event.preventDefault(); 4476 4477 4478 4479 $("#newsroom_form").find("#newsroom_but").hide(); 4480 4481 $("#newsroom_form").append('<span class="loader _w"> </span>'); 4482 4483 $("#newsroom_form").find("#message_n").removeClass("error"); 4484 4485 $("#newsroom_form").find("#email_n").removeClass("error"); 4486 4487 $("#newsroom_form").find("#lname_n").removeClass("error"); 4488 4489 $("#newsroom_form").find("#fname_n").removeClass("error"); 4490 4491 $("#newsroom_form").find(".error_message").remove(); 4492 4493 4494 4495 var count_bug=0; 4496 4497 if (document.newsroom_form.message_n.value=="") 4498 4499 { 4500 4501 $("#newsroom_form").find("#message_n").addClass("error"); 4502 4503 $("#newsroom_form").find("#message_n").after('<span class="error_message">Required</span>'); 4504 4505 document.newsroom_form.message_n.focus(); 4506 4507 if(eval(count_bug)==0) 4508 4509 count_bug+=1; 4510 4511 } 4512 4513 4514 4515 if (document.newsroom_form.email_n.value=="") 4516 4517 { 4518 4519 $("#newsroom_form").find("#email_n").addClass("error"); 4520 4521 $("#newsroom_form").find("#email_n").after('<span class="error_message">Required</span>'); 4522 4523 document.newsroom_form.email_n.focus(); 4524 4525 if(eval(count_bug)==0) 4526 4527 count_bug+=1; 4528 4529 } 4530 4531 else 4532 4533 { 4534 4535 4536 4537 var emailIn = $( "#email_nn" ).val(); 4538 4539 //alert(emailIn); 4540 4541 4542 4543 var check_email = check_email_now(emailIn); 4544 4545 4546 4547 if(check_email == false) 4548 4549 { 4550 4551 $("#newsroom_form").find("#email_n").addClass("error"); 4552 4553 $("#email_n").append('<span class="error_message">Invalid Email Id</span>'); 4554 4555 //$("#email_n").append("<div class='invalid-tooltip' style='display:block' >Invalid Email Id</div>"); 4556 4557 document.newsroom_form.email_n.focus(); 4558 4559 count_bug+=1; 4560 4561 } 4562 4563 } 4564 4565 4566 4567 if (document.newsroom_form.lname_n.value=="") 4568 4569 { 4570 4571 $("#newsroom_form").find("#lname_n").addClass("error"); 4572 4573 $("#newsroom_form").find("#lname_n").after('<span class="error_message">Required</span>'); 4574 4575 document.newsroom_form.lname_n.focus(); 4576 4577 if(eval(count_bug)==0) 4578 4579 count_bug+=1; 4580 4581 } 4582 4583 4584 4585 if (document.newsroom_form.fname_n.value=="") 4586 4587 { 4588 4589 $("#newsroom_form").find("#fname_n").addClass("error"); 4590 4591 $("#newsroom_form").find("#fname_n").after('<span class="error_message">Required</span>'); 4592 4593 document.newsroom_form.fname_n.focus(); 4594 4595 if(eval(count_bug)==0) 4596 4597 count_bug+=1; 4598 4599 } 4600 4601 4602 4603 if(count_bug == 0) 4604 4605 { 4606 4607 email = document.newsroom_form.email_n.value; 4608 4609 message = document.newsroom_form.message_n.value; 4610 4611 url = document.newsroom_form.url_n.value; 4612 4613 lname = document.newsroom_form.lname_n.value; 4614 4615 fname = document.newsroom_form.fname_n.value; 4616 4617 //alert(email); 4618 4619 $.post("newsroom-next.php",{email:email,message:message,lname:lname,fname:fname,url:url},function(result){ 4620 4621 //alert(result); 4622 4623 //$("#newsroom_form").find('._w').remove(); 4624 4625 $("#newsroom_form").html(result); 4626 4627 //$("#newsroom_form").find("#newsroom_but").show(); 4628 4629 4630 4631 document.newsroom_form.email_n.value = ''; 4632 4633 document.newsroom_form.message_n.value = ''; 4634 4635 document.newsroom_form.lname_n.value = ''; 4636 4637 document.newsroom_form.fname_n.value = ''; 4638 4639 4640 4641 setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 4642 4643 }); 4644 4645 } 4646 4647 else 4648 4649 { 4650 4651 $("#newsroom_form").find('._w').remove(); 4652 4653 $("#newsroom_form").find("#newsroom_but").show(); 4654 4655 event.stopPropagation(); 4656 4657 event.preventDefault(); 4658 4659 return false;
4660 4661 } 4662 4663 4664 4665 }); 4666 4667 4668 4669 //Newsroom form End 4670 4671 4672 4673 //Share Article Start 4674 4675 4676 4677 //Fb Share Start 4678 4679 4680 4681 $('#fb_share_w').on("click",function() 4682 4683 { 4684 4685 //alert(); 4686 4687 var uri = window.location.href; 4688 4689 var res = encodeURI(uri); 4690 4691 //alert(res); 4692 4693 var fb = 'http://www.facebook.com/sharer.php?u='+res; 4694 4695 window.open(fb,'sharer','toolbar=0,status=0,width=648,height=395'); 4696 4697 return true; 4698 4699 }); 4700 4701 4702 4703 $('#fb_share').on("click",function() 4704 4705 { 4706 4707 //alert(); 4708 4709 var uri = window.location.href; 4710 4711 var res = encodeURI(uri); 4712 4713 //alert(res); 4714 4715 var fb = 'http://www.facebook.com/sharer.php?u='+res; 4716 4717 window.open(fb,'sharer','toolbar=0,status=0,width=648,height=395'); 4718 4719 return true; 4720 4721 }); 4722 4723 4724 4725 //Fb Share End 4726 4727 4728 4729 //Twitter Share Start 4730 4731 4732 4733 $('#tw_share_w').on("click",function() 4734 4735 { 4736 4737 var uri = window.location.href; 4738 4739 var res = encodeURI(uri); 4740 4741 //alert(res); 4742 4743 var tw = 'http://www.twitter.com/intent/tweet?url='+res; 4744 4745 window.open(tw,'sharer','toolbar=0,status=0,width=648,height=395'); 4746 4747 return true; 4748 4749 }); 4750 4751 4752 4753 $('#tw_share').on("click",function() 4754 4755 { 4756 4757 var uri = window.location.href; 4758 4759 var res = encodeURI(uri); 4760 4761 //alert(res); 4762 4763 var tw = 'http://www.twitter.com/intent/tweet?url='+res; 4764 4765 window.open(tw,'sharer','toolbar=0,status=0,width=648,height=395'); 4766 4767 return true; 4768 4769 }); 4770 4771 4772 4773 //Twitter Share End 4774 4775 4776 4777 //Linkedin Share Start 4778 4779 4780 4781 $('#ln_share_w').on("click",function() 4782 4783 { 4784 4785 var uri = window.location.href; 4786 4787 var res = encodeURI(uri); 4788 4789 //alert(res); 4790 4791 var ln = 'http://www.linkedin.com/shareArticle?mini=true&url='+res+'&source=STIRworld'; 4792 4793 window.open(ln,'sharer','toolbar=0,status=0,width=648,height=395'); 4794 4795 return true; 4796 4797 }); 4798 4799 4800 4801 $('#ln_share').on("click",function() 4802 4803 { 4804 4805 var uri = window.location.href; 4806 4807 var res = encodeURI(uri); 4808 4809 //alert(res); 4810 4811 var ln = 'http://www.linkedin.com/shareArticle?mini=true&url='+res+'&source=STIRworld'; 4812 4813 window.open(ln,'sharer','toolbar=0,status=0,width=648,height=395'); 4814 4815 return true; 4816 4817 }); 4818 4819 4820 4821 //Linkedin Share End 4822 4823 4824 4825 //Whatsapp Web Share Start 4826 4827 4828 4829 $('#whw_share').on("click",function() 4830 4831 { 4832 4833 var uri = window.location.href; 4834 4835 var res = encodeURI(uri); 4836 4837 //alert(res); 4838 4839 var whw = 'https://web.whatsapp.com/send?text='+res; 4840 4841 window.open(whw,'sharer','toolbar=0,status=0,width=648,height=395'); 4842 4843 return true; 4844 4845 }); 4846 4847 4848 4849 //Whatsapp Web Share End 4850 4851 4852 4853 //Whatsapp Mob Share Start 4854 4855 4856 4857 $('#whm_share').on("click",function() 4858 4859 { 4860 4861 var uri = window.location.href; 4862 4863 var res = encodeURI(uri); 4864 4865 //alert(res); 4866 4867 var whw = 'https://api.whatsapp.com/send?text='+res; 4868 4869 window.open(whw,'sharer','toolbar=0,status=0,width=648,height=395'); 4870 4871 return true; 4872 4873 }); 4874 4875 4876 4877 //Whatsapp Mob Share End 4878 4879 4880 4881 //Medium Share Start 4882 4883 4884 4885 $('.socials').find('.clap_sh').on("click",function() 4886 4887 { 4888 4889 var article_id = $('#article_id_sh').val(); 4890 4891 var name = $('#name_sh').val(); 4892 4893 var email = $('#email_sh').val(); 4894 4895 var usercode = $('#usercode_sh').val(); 4896 4897 $.post("clap-next.php",{article_id:article_id,name:name,email:email,usercode:usercode},function(result){ 4898 4899 //alert(result); 4900 4901 4902 4903 var str = result.split("$$"); 4904 4905 alert(str[0]); 4906 4907 alert(str[1]); 4908 4909 $('.socials').find('.clap_sh').addClass("error"); 4910 4911 $('.socials').find('.clap_sh').css("color", "red"); 4912 4913 $('.socials').find('.clap_sh').next().html(str[1]); 4914 4915 4916 4917 //setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 4918 4919 }); 4920 4921 }); 4922 4923 4924 4925 //Medium Share End 4926 4927 4928 4929 //Share Article End 4930 4931 4932 4933 //Comment Check Start 4934 4935 4936 4937 $('#check_commment').on("click",function() 4938 4939 { 4940 4941 $('#signup_popup .loginbut').click(); 4942 4943 }); 4944 4945 4946 4947 function check_commment(commentId) 4948 4949 { 4950 4951 $('#signup_popup .loginbut').click(); 4952 4953 } 4954 4955 4956 4957 //Comment Check End 4958 4959 4960 4961 4962 4963 //Comment Section Start 4964 4965 4966 4967 function postReply(commentId) 4968 4969 { 4970 4971 $("#submitButton"+commentId).hide(); 4972 4973 $("#btn_loader"+commentId).append('<span class="loader _b"> </span>'); 4974 4975 //$("#text_comment"+commentId).css({border:''}); 4976 4977 $("#text_comment"+commentId).find('.error_message').remove(); 4978 4979 //$("#comment-message"+commentId).css('display', 'none'); 4980 4981 var str = $("#frm-comment"+commentId).serialize(); 4982 4983 4984 4985 var comment = $.trim($("#comment"+commentId).val()); 4986 4987 //alert(comment); 4988 4989 if(comment == '') 4990 4991 { 4992 4993 $("#submitButton"+commentId).show(); 4994 4995 $("._b").remove(); 4996 4997 //$("#text_comment"+commentId).css({border:'1px solid #c80909'}); 4998 4999 $("#text_comment"+commentId).append('<span class="error_message">Required</span>'); 5000 5001 $("#comment"+commentId).focus(); 5002 5003 //document.frm-comment.comment.focus(); 5004 5005 } 5006 5007 else 5008 5009 { 5010 5011 $.ajax({ 5012 5013 url: "comment-add.php", 5014 5015 data: str, 5016 5017 type: 'post', 5018 5019 success: function (response) 5020 5021 { 5022 5023 //alert(response); 5024 5025 //var result = eval('(' + response + ')'); 5026 5027 if (response == 1) 5028 5029 { 5030 5031 $("#submitButton"+commentId).show(); 5032 5033 $("._b").remove(); 5034 5035 $("#comment"+commentId).val(""); 5036 5037 $("#"+commentId).parents('li').find('.resp'+commentId).slideToggle(); 5038 5039 //$("#comment-message"+commentId).css('display', 'inline-block'); 5040 5041 $("#frm-comment").append("<p class='comment-message'>Thank you. Your comment has been published.</p>"); 5042 5043 setTimeout(function(){ $(".comment-message").fadeOut(); }, 5000); 5044 5045 setTimeout(function(){ listComment(); }, 3000); 5046 5047 5048 5049 } 5050 5051 else 5052 5053 { 5054 5055 //alert("Failed to add comments !"); 5056 5057 $("#submitButton"+commentId).show(); 5058 5059 $("._b").remove(); 5060 5061 $("#"+commentId).parents('li').find('.resp'+commentId).slideToggle(); 5062 5063 $("#frm-comment").append("<p class='comment-message'>Thank you. Your comment is under review and will be published soon.<span class='comment_close'>OK</span></p>"); 5064 5065 //setTimeout(function(){ $('.error_message').fadeOut();$('.error_message').remove(); }, 6000); 5066 5067 $("#comment"+commentId).val(""); 5068 5069 return false;
5070 5071 } 5072 5073 } 5074 5075 }); 5076 5077 } 5078 5079 } 5080 5081 5082 5083 $("#submitButton").click(function () 5084 5085 { 5086 5087 //alert(); 5088 5089 5090 5091 $("#submitButton").hide(); 5092 5093 $("#btn_loader").append('<span class="loader _b"> </span>'); 5094 5095 //$("#text_comment").css({border:''}); 5096 5097 $("#text_comment").find('.error_message').remove(); 5098 5099 //$("#comment-message").css('display', 'none'); 5100 5101 var str = $("#frm-comment").serialize(); 5102 5103 5104 5105 var comment = $.trim($("textarea[name=comment]").val()); 5106 5107 //alert(comment); 5108 5109 if(comment == '') 5110 5111 { 5112 5113 $("#submitButton").show(); 5114 5115 $("._b").remove(); 5116 5117 //$("#text_comment").css({border:'1px solid #c80909'}); 5118 5119 $("#text_comment").append('<span class="error_message">Required</span>'); 5120 5121 //document.frm-comment.comment.focus(); 5122 5123 $("#comment").focus(); 5124 5125 } 5126 5127 else 5128 5129 { 5130 5131 $.ajax({ 5132 5133 url: "comment-add.php", 5134 5135 data: str, 5136 5137 type: 'post', 5138 5139 success: function (response) 5140 5141 { 5142 5143 //var result = eval('(' + response + ')'); 5144 5145 //alert(response); 5146 5147 if (response == 1) 5148 5149 { 5150 5151 // alert('here'); 5152 5153 $("#frm-comment").append("<p class='comment-message'>Thank you. Your comment has been published.</p>"); 5154 5155 setTimeout(function(){ $('.comment-message').fadeOut();$('.comment-message').remove(); }, 5000); 5156 5157 $("#submitButton").show(); 5158 5159 $("._b").remove(); 5160 5161 $("#comment").val(""); 5162 5163 listComment(); 5164 5165 } 5166 5167 else 5168 5169 { 5170 5171 //alert("Failed to add comments !"); 5172 5173 $("#submitButton").show(); 5174 5175 $("._b").remove(); 5176 5177 $("#frm-comment").append("<p class='comment-message'>Thank you. Your comment is under review and will be published soon.<span class='comment_close'>OK</span></p>"); 5178 5179 //setTimeout(function(){ $('.comment-message').fadeOut();$('.comment-message').remove(); }, 6000); 5180 5181 $("#comment").val(""); 5182 5183 5184 5185 return false; 5186 5187 } 5188 5189 } 5190 5191 }); 5192 5193 } 5194 5195 }); 5196 5197 5198 5199 $(document).ready(function () { 5200 5201 if($('body').hasClass('article_checker')) 5202 5203 { 5204 5205 listComment(); 5206 5207 } 5208 5209 }); 5210 5211 5212 5213 $(document).on('click','.comment_close',function() 5214 5215 { 5216 5217 $('.comment-message').fadeOut(); 5218 5219 $('.comment-message').remove(); 5220 5221 }); 5222 5223 5224 5225 function listComment() { 5226 5227 5228 5229 $("#comment_sec").append('<span class="loader _b"> </span>'); 5230 5231 var article_id_comment = $("#article_id_comment").val(); 5232 5233 var name_comment = $("#name_comment").val(); 5234 5235 var useremail_comment = $("#useremail_comment").val(); 5236 5237 var usercode_comment = $("#usercode_comment").val(); 5238 5239 var profile_pic = $("#profile_pic").attr('src'); 5240 5241 //alert(profile_pic); 5242 5243 $.post("comment-list.php",{article_id_comment:article_id_comment}, 5244 5245 function (data) { 5246 5247 //alert(data); 5248 5249 $('._b').remove(); 5250 5251 var data = JSON.parse(data); 5252 5253 var comments = ""; 5254 5255 var replies = ""; 5256 5257 var item = ""; 5258 5259 var parent = -1; 5260 5261 var results = new Array(); 5262 5263 5264 5265 var list = $("<ul class='outer-comment'>"); 5266 5267 var item = $("<li>").html(comments); 5268 5269 for (var i = 0; (i < data.length); i++) 5270 5271 { 5272 5273 var commentId = data[i]['comment_id']; 5274 5275 parent = data[i]['parent_comment_id']; 5276 5277 /*var d_date = data[i]['date']; 5278 5279 const months = ["Jan", "Feb", "Mar","Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; 5280 5281 var current_datetime = new Date(d_date); 5282 5283 var c_date = months[current_datetime.getMonth()] + " " + current_datetime.getDate() + ", " + current_datetime.getFullYear();*/ 5284 5285 var c_date = data[i]['date']; 5286 5287 if(data[i]['comments_count'] == 0) 5288 5289 { 5290 5291 var response = "<span class='btn-response'>"+ data[i]['comments_count'] + " Response </span>"; 5292 5293 } 5294 5295 else if(data[i]['comments_count'] == 1) 5296 5297 { 5298 5299 var response = "<span class='btn-response' onClick='response("+ commentId +")'>"+ data[i]['comments_count'] + " Response </span>"; 5300 5301 } 5302 5303 else 5304 5305 { 5306 5307 var response = "<span class='btn-response' onClick='response("+ commentId +")'>
5307"+ data[i]['comments_count'] + " Responses </span>"; 5308 5309 } 5310 5311 if((data[i]['usercode_sw'] == 157) && (data[i]['useremail_sw'] == '[email protected]')) 5312 5313 { 5314 5315 var user_prefrence = ' | Admin'; 5316 5317 } 5318 5319 else 5320 5321 { 5322 5323 var user_prefrence = ''; 5324 5325 } 5326 5327 if (parent == "0") 5328 5329 { 5330 5331 comments = "<div class='comment-row'>"+ 5332 5333 "<div class='comment-info'><div class='thumb_hold'><span><img src='"+data[i]['profile_pic']+"' alt='"+data[i]['sender_name']+"' /> </span></div> <div class='info_detail'><span class='posted-by'>" + data[i]['sender_name'] + " </span> <span class='posted-at'>" + c_date + "" + user_prefrence +"</span></div></div>" + 5334 5335 "<div class='comment-text'>" + data[i]['comment'] + "</div>"+ 5336 5337 "<div class='comment_footer'><span class='btn arrow' id='"+commentId+"' onClick='reply("+ commentId +")'> Reply </span>"+response+"</div>"+ 5338 5339 "</div>"; 5340 5341 5342 5343 var item = $("<li class='outer-li'>").html(comments); 5344 5345 list.append(item); 5346 5347 if(useremail_comment != '') 5348 5349 { 5350 5351 var reply_list = $('<ul class="resp'+commentId+' replybox">').append("<form id='frm-comment"+commentId+"'>"+ 5352 5353 "<input type='hidden' name='comment_id' id='commentId"+commentId+"' value='"+commentId+"'/>" + 5354 5355 "<input type='hidden' name='article_id_comment' id='article_id_comment"+commentId+"' value='"+article_id_comment+"' />"+ 5356 5357 "<input type='hidden' name='name_comment' id='name_comment"+commentId+"' value='"+name_comment+"' />"+ 5358 5359 "<input type='hidden' name='useremail_comment' id='useremail_comment"+commentId+"' value='"+useremail_comment+"' />"+ 5360 5361 "<input type='hidden' name='usercode_comment' id='usercode_comment"+commentId+"' value='"+usercode_comment+"' />"+ 5362 5363 "<div class='field_hold' id='text_comment"+commentId+"'>"+ 5364 5365 "<div class='thumb_hold'>"+ 5366 5367 "<span><img src='"+profile_pic+"' alt='"+name_comment+"' /></span>"+ 5368 5369 "</div>"+ 5370 5371 "<textarea class='form-control' type='text' name='comment' maxlength='1000' id='comment"+commentId+"' placeholder='Leave your thought or question...'></textarea>"+ 5372 5373 "</div>"+ 5374 5375 "<div class='post_comment_btn_holder' id='btn_loader"+commentId+"'>"+ 5376 5377 "<input type='button' class='btn' id='submitButton"+commentId+"' onClick='postReply("+ commentId +")' value='Reply' />"+ 5378 5379 "</div><script>"+ 5380 5381 "function expandTextarea(cl){"+ 5382 5383 "document.getElementById(cl).addEventListener('keyup', function() {"+ 5384 5385 "this.style.overflow = 'hidden';"+ 5386 5387 "this.style.height = 0;"+ 5388 5389 "this.style.height = this.scrollHeight + 'px';"+ 5390 5391 "}, false);}"+ 5392 5393 "expandTextarea('comment"+commentId+"');</script></form>"); 5394 5395 } 5396 5397 else 5398 5399 { 5400 5401 var reply_list = $('<ul class="resp'+commentId+' replybox">').append("<form id='frm-comment"+commentId+"'>"+ 5402 5403 "<input type='hidden' name='comment_id' id='commentId"+commentId+"' value='"+commentId+"'/>" + 5404 5405 "<input type='hidden' name='article_id_comment' id='article_id_comment"+commentId+"' value='"+article_id_comment+"' />"+ 5406 5407 "<input type='hidden' name='name_comment' id='name_comment"+commentId+"' value='"+name_comment+"' />"+ 5408 5409 "<input type='hidden' name='useremail_comment' id='useremail_comment"+commentId+"' value='"+useremail_comment+"' />"+ 5410 5411 "<input type='hidden' name='usercode_comment' id='usercode_comment"+commentId+"' value='"+usercode_comment+"' />"+ 5412 5413 "<div class='field_hold' id='text_comment"+commentId+"'>"+ 5414 5415 "<textarea class='form-control' type='text' name='comment' maxlength='1000' id='comment"+commentId+"' onClick='check_commment("+commentId+")' readonly placeholder='Leave your thought or question...'></textarea>"+ 5416 5417 "</div>"+ 5418 5419 "<div class='post_comment_btn_holder'>"+ 5420 5421 "<input type='button' class='btn' id='submitButton"+commentId+"' onClick='postReply("+ commentId +")' value='Reply' />"+ 5422 5423 "</div><script>"+ 5424 5425 "function expandTextarea(cl){"+ 5426 5427 "document.getElementById(cl).addEventListener('keyup', function() {"+ 5428 5429 "this.style.overflow = 'hidden';"+ 5430 5431 "this.style.height = 0;"+ 5432 5433 "this.style.height = this.scrollHeight + 'px';"+ 5434 5435 "}, false);}"+ 5436 5437 "expandTextarea('comment"+commentId+"');</script></form>"); 5438 5439 } 5440 5441 item.append(reply_list); 5442 5443 listReplies(commentId, data, reply_list); 5444 5445 } 5446 5447 } 5448 5449 $("#output_comment").html(list); 5450 5451 var counter_li = $('#output_comment li.outer-li').length; 5452 5453 //alert(counter_li); 5454 5455 if(counter_li > 3) 5456 5457 { 5458 5459 //$('#output_comment li.outer-li').addClass('add'); 5460 5461 $('#output_comment li.outer-li').addClass(function(i) { 5462 5463 return i > 2 ? 'd-none' : (i % 3 === 1 ? '' : ''); 5464 5465 }); 5466 5467 $("#output_comment").append('<a href="javascript:void(0);" class="read_more" id="comment_loadmore">Load More</a>'); 5468 5469 } 5470 5471 5472 5473 }); 5474 5475 } 5476 5477 function listReplies(commentId, data, list) 5478 5479 { 5480 5481 var article_id_comment = $("#article_id_comment").val(); 5482 5483 var name_comment = $("#name_comment").val(); 5484 5485 var useremail_comment = $("#useremail_comment").val(); 5486 5487 var usercode_comment = $("#usercode_comment").val(); 5488 5489 var profile_pic = $("#profile_pic").attr('src'); 5490 5491 for (var i = 0; (i < data.length); i++) 5492 5493 { 5494 5495 if (commentId == data[i].parent_comment_id) 5496 5497 { 5498 5499 /*var d_date1 = data[i]['date']; 5500 5501 const months = ["Jan", "Feb", "Mar","Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; 5502 5503 var current_datetime1 = new Date(d_date1); 5504 5505 var l_date = months[current_datetime1.getMonth()] + " " + current_datetime1.getDate() + ", " + current_datetime1.getFullYear();*/ 5506 5507 var l_date = data[i]['date']; 5508 5509 if(data[i]['comments_count'] == 0) 5510 5511 { 5512 5513 var response = data[i]['comments_count'] + " Response"; 5514 5515 } 5516 5517 else if(data[i]['comments_count'] < 1) 5518 5519 { 5520 5521 var response = data[i]['comments_count'] + " Response"; 5522 5523 } 5524 5525 else 5526 5527 { 5528 5529 var response = data[i]['comments_count'] + " Responses"; 5530 5531 } 5532
5533 if((data[i]['usercode_sw'] == 157) && (data[i]['useremail_sw'] == '[email protected]')) 5534 5535 { 5536 5537 var user_prefrence = ' | Admin'; 5538 5539 } 5540 5541 else 5542 5543 { 5544 5545 var user_prefrence = ''; 5546 5547 } 5548 5549 5550 5551 var comments = "<div class='comment-row'>"+ 5552 5553 "<div class='comment-info'><div class='thumb_hold'><span><img src='"+data[i]['profile_pic']+"' alt='"+data[i]['sender_name']+"' /> </span></div> <div class='info_detail'><span class='posted-by'>" + data[i]['sender_name'] + " </span> <span class='posted-at'>" + l_date + "" + user_prefrence + "</span></div></div>" + 5554 5555 "<div class='comment-text'>" + data[i]['comment'] + "</div>"+ 5556 5557 5558 5559 "</div>"; 5560 5561 var item = $("<li class='resp_text"+data[i].parent_comment_id+"'>").html(comments); 5562 5563 5564 5565 var reply_list = ''; 5566 5567 list.append(item); 5568 5569 item.append(reply_list); 5570 5571 listReplies(data[i].comment_id, data, reply_list); 5572 5573 //alert(data[i].comment_id); 5574 5575 } 5576 5577 } 5578 5579 } 5580 5581/* 5582 5583 function listReplies(commentId, data, list) 5584 5585 { 5586 5587 var article_id_comment = $("#article_id_comment").val(); 5588 5589 var name_comment = $("#name_comment").val(); 5590 5591 var useremail_comment = $("#useremail_comment").val(); 5592 5593 var usercode_comment = $("#usercode_comment").val(); 5594 5595 var profile_pic = $("#profile_pic").attr('src'); 5596 5597 for (var i = 0; (i < data.length); i++) 5598 5599 { 5600 5601 if (commentId == data[i].parent_comment_id) 5602 5603 { 5604 5605 var d_date1 = data[i]['date']; 5606 5607 const months = ["Jan", "Feb", "Mar","Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; 5608 5609 var current_datetime1 = new Date(d_date1); 5610 5611 var l_date = months[current_datetime1.getMonth()] + " " + current_datetime1.getDate() + ", " + current_datetime1.getFullYear(); 5612 5613 if(data[i]['comments_count'] < 2) 5614 5615 { 5616 5617 var response = data[i]['comments_count'] + " Response"; 5618 5619 } 5620 5621 else 5622 5623 { 5624 5625 var response = data[i]['comments_count'] + " Responses"; 5626 5627 } 5628 5629 5630 5631 var comments = "<div class='comment_popup cp"+comment_id+"'><div class='wrapper'><span class='close_btn'></span>"+ 5632 5633 "<div class='comment_area'>"+ 5634 5635 "<ul class='outer-comment'>"+ 5636 5637 "<li>"+ 5638 5639 "<div class='comment-row'>"+ 5640 5641 "<div class='comment-info'>"+ 5642 5643 "<div class='thumb_hold'>"+ 5644 5645 "<span>"+ 5646 5647 "<img src='"+profile_pic+"' alt='"+name_comment+"'>"+ 5648 5649 "</span>"+ 5650 5651 "</div> "+ 5652 5653 "<div class='info_detail'>"+ 5654 5655 "<span class='posted-by'>"+name_comment+" </span> "+ 5656 5657 "<span class='posted-at'>"+l_date+"</span>"+ 5658 5659 "</div>"+ 5660 5661 "</div>"+ 5662 5663 "<div class='comment-text'>"+data[i]['comment']+"</div>"+ 5664 5665 "</div>"+ 5666 5667 "</li>"+ 5668 5669 "</ul>"+ 5670 5671 "</div></div></div>"; 5672 5673 var item = $("<li>").html(comments); 5674 5675 5676 5677 var reply_list = ''; 5678 5679 list.append(item); 5680 5681 item.append(reply_list); 5682 5683 listReplies(data[i].comment_id, data, reply_list); 5684 5685 } 5686 5687 } 5688 5689 }*/ 5690 5691 5692 5693 function reply(cd) 5694 5695 { 5696 5697 $(document).ready(function () { 5698 5699 $('#frm-comment'+cd).show(); 5700 5701 $('.resp_text'+cd).hide(); 5702 5703 $("#"+cd).parents('li').find('.resp'+cd).slideToggle(); 5704 5705 }); 5706 5707 } 5708 5709 5710 5711 function reply1(cd) 5712 5713 { 5714 5715 $(document).ready(function () { 5716 5717 $("#"+cd).parents('li').find('.resp1'+cd).slideToggle(); 5718 5719 }); 5720 5721 } 5722 5723 5724 5725 5726 5727 function response(cd) 5728 5729 { 5730 5731 //$("#"+cd).parents('li').find('.resp'+cd).slideToggle(); 5732 5733 $(document).ready(function () { 5734 5735 $('#frm-comment'+cd).hide(); 5736 5737 $('.resp_text'+cd).show(); 5738 5739 $('.comment_popup').find('#main_comment_text').html($('.resp'+cd).html()); 5740 5741 $('.comment_popup').show(); 5742 5743 }); 5744 5745 } 5746 5747 5748 5749 $('.comment_popup .close_btn').click(function(){ 5750 5751 $(this).parents('.comment_popup').fadeOut(); 5752 5753 }) 5754 5755 5756 5757 5758 5759 5760 5761 //Comment Section End 5762 5763 5764 5765 //Image Cropping Function Start 5766 5767 5768 5769 $(document).ready(function(){ 5770 5771 5772 5773 $image_crop = $('#image_demo').croppie({ 5774 5775 enableExif: true, 5776 5777 viewport: { 5778 5779 width:300, 5780 5781 height:300, 5782 5783 type:'square' //circle 5784 5785 }, 5786 5787 boundary:{ 5788 5789 width:400, 5790 5791 height:400 5792 5793 } 5794 5795 }); 5796 5797 5798 5799 $('#upload_image').on('change', function() 5800 5801 { 5802 5803 $('.error_message').remove(); 5804 5805 var typ = this.value; 5806 5807 if(typ.match(".jpg") || typ.match(".jpeg") || typ.match(".png")) 5808 5809 { 5810 5811 var a = this.files[0].size; 5812 5813 if(a > 2000000) 5814 5815 { 5816 5817 $(".change_pic_holder").append("<span class='error_message'>Image size can't be more than 2 MB.</span>"); 5818 5819 } 5820 5821 else 5822 5823 { 5824 5825 var reader = new FileReader(); 5826 5827 reader.onload = function (event) 5828 5829 { 5830 5831 $image_crop.croppie('bind', { 5832 5833 url: event.target.result 5834 5835 }).then(function(){ 5836 5837 //console.log('jQuery bind complete'); 5838 5839 }); 5840 5841 } 5842 5843 5844 5845 } 5846
5847 reader.readAsDataURL(this.files[0]); 5848 5849 $('#uploadimageModal').modal('show'); 5850 5851 } 5852 5853 else 5854 5855 { 5856 5857 $(".change_pic_holder").append("<span class='error_message'>Only .jpg,.jpeg,.png file is valid</span>"); 5858 5859 } 5860 5861 }); 5862 5863 5864 5865 $('.crop_image').click(function(event){ 5866 5867 $image_crop.croppie('result', { 5868 5869 type: 'canvas', 5870 5871 size: 'viewport' 5872 5873 }).then(function(response){ 5874 5875 var i_name = $('#upload_image').val(); 5876 5877 $.ajax({ 5878 5879 url:"upload.php", 5880 5881 type: "POST", 5882 5883 data:{"image": response,i_name:i_name}, 5884 5885 success:function(data) 5886 5887 { 5888 5889 $('#uploadimageModal').modal('hide'); 5890 5891 $('#uploaded_image').html(data); 5892 5893 } 5894 5895 }); 5896 5897 }) 5898 5899 }); 5900 5901 5902 5903 }); 5904 5905 5906 5907 5908 5909 //Image Cropping Function End 5910 5911 5912 5913 //Check listing login start 5914 5915 5916 5917 $("#title_l_c").keyup(function() 5918 5919 { 5920 5921 //alert($('#title_l').val()); 5922 5923 $( "#title_l_c" ).val(''); 5924 5925 }); 5926 5927 5928 5929 //Check listing login End 5930 5931 5932 5933 5934 5935 //Listing Form Start 5936 5937 5938 5939 $('#listing_but').on("click",function() 5940 5941 { 5942 5943 event.preventDefault(); 5944 5945 $("#listing_form").find("#listing_but").hide(); 5946 5947 $("#listing_form").append('<span class="loader _b"> </span>'); 5948 5949 $("#listing_form").find(".email_l").removeClass("error"); 5950 5951 $("#listing_form").find(".deadline_l").removeClass("error"); 5952 5953 $("#listing_form").find(".url_l").removeClass("error"); 5954 5955 $("#listing_form").find(".line_l").removeClass("error"); 5956 5957 $("#listing_form").find(".desc_l").removeClass("error"); 5958 5959 $("#listing_form").find(".list_l").removeClass("error"); 5960 5961 $("#listing_form").find(".date_l").removeClass("error"); 5962 5963 $("#listing_form").find(".e_date_l").removeClass("error"); 5964 5965 $("#listing_form").find(".location_l").removeClass("error"); 5966 5967 $("#listing_form").find(".title_l").removeClass("error"); 5968 5969 $("#listing_form").find(".error_message").remove(); 5970 5971 5972 5973 //alert(document.listing_form.e_date_l.value) ; 5974 5975 var count_bug = 0; 5976 5977 5978 5979 if (document.listing_form.captcha_response.value=="") 5980 5981 { 5982 5983 /*$("#resp").css({border:'1px solid #ed1c24'}); 5984 5985 $("#resp").css({width:'304px'}); 5986 5987 $("#resp").css({height:'78px'});*/ 5988 5989 $("#listing_form").find("#resp").after("<span class='error_message'>Please check captcha.</span>"); 5990 5991 if(eval(count_bug)==0) 5992 5993 count_bug+=1; 5994 5995 } 5996 5997 5998 5999 if (document.listing_form.email_l.value=="") 6000 6001 { 6002 6003 $("#listing_form").find(".email_l").addClass("error"); 6004 6005 $("#listing_form").find(".email_l").after('<span class="error_message">Required</span>'); 6006 6007 document.listing_form.email_l.focus(); 6008 6009 if(eval(count_bug)==0) 6010 6011 count_bug+=1; 6012 6013 } 6014 6015 else 6016 6017 { 6018 6019 6020 6021 var emailIn = $( "#email_l" ).val(); 6022 6023 6024 6025 var check_email = check_email_now(emailIn); 6026 6027 6028 6029 if(check_email == false) 6030 6031 { 6032 6033 $("#listing_form").find(".email_l").addClass("error"); 6034 6035 $("#listing_form").find(".email_l").after("<span class='error_message'>Invalid Email id</span>"); 6036 6037 document.login_form.email.focus(); 6038 6039 count_bug+=1; 6040 6041 } 6042 6043 } 6044 6045 6046 6047 if (document.listing_form.deadline_l.value=="") 6048 6049 { 6050 6051 $("#listing_form").find(".deadline_l").addClass("error"); 6052 6053 $("#listing_form").find(".deadline_l").after('<span class="error_message">Required</span>'); 6054 6055 document.listing_form.deadline_l.focus(); 6056 6057 if(eval(count_bug)==0) 6058 6059 count_bug+=1; 6060 6061 } 6062 6063 if (document.listing_form.url_l.value=="") 6064 6065 { 6066 6067 $("#listing_form").find(".url_l").addClass("error"); 6068 6069 $("#listing_form").find(".url_l").after('<span class="error_message">Required</span>'); 6070 6071 document.listing_form.url_l.focus(); 6072 6073 if(eval(count_bug)==0) 6074 6075 count_bug+=1; 6076 6077 } 6078 6079 if (document.listing_form.line_l.value=="") 6080 6081 { 6082 6083 $("#listing_form").find(".line_l").addClass("error"); 6084 6085 $("#listing_form").find(".line_l").after('<span class="error_message">Required</span>'); 6086 6087 document.listing_form.line_l.focus(); 6088 6089 if(eval(count_bug)==0) 6090 6091 count_bug+=1; 6092 6093 } 6094 6095 if (document.listing_form.m_banner_l.value=="") 6096 6097 { 6098 6099 $("#listing_form").find(".m_banner_l").after("<span class='error_message'>Mobile lead image can't be empty</span>"); 6100 6101 document.listing_form.m_banner_l.focus(); 6102 6103 if(eval(count_bug)==0) 6104 6105 count_bug+=1; 6106 6107 } 6108 6109 else 6110 6111 { 6112 6113 6114 6115 } 6116 6117 if (document.listing_form.l_banner_l.value=="") 6118 6119 { 6120 6121 $("#listing_form").find(".l_banner_l").after("<span class='error_message'>Lead image can't be empty</span>"); 6122 6123 document.listing_form.l_banner_l.focus(); 6124 6125 if(eval(count_bug)==0) 6126 6127 count_bug+=1; 6128 6129 } 6130 6131 if (document.listing_form.b_banner_l.value=="") 6132 6133 { 6134 6135 $("#listing_form").find(".b_banner_l").after("<span class='error_message'>Thumbnail image can't be empty</span>"); 6136 6137 document.listing_form.b_banner_l.focus(); 6138 6139 if(eval(count_bug)==0) 6140 6141 count_bug+=1; 6142 6143 } 6144 6145 if (document.listing_form.desc_l.value=="") 6146 6147 { 6148 6149 $("#listing_form").find(".desc_l").addClass("error"); 6150 6151 $("#listing_form").find(".desc_l").after('<span class="error_message">Required</span>'); 6152 6153 document.listing_form.desc_l.focus(); 6154 6155 if(eval(count_bug)==0) 6156 6157 count_bug+=1; 6158 6159 } 6160 6161 /*if (document.listing_form.e_date_l.value=="") 6162 6163 { 6164 6165 $("#listing_form").find(".e_date_l").addClass("error"); 6166 6167 document.listing_form.e_date_l.focus(); 6168 6169 if(eval(count_bug)==0) 6170 6171 count_bug+=1; 6172 6173 }*/ 6174 6175 if (document.listing_form.date_l.value=="") 6176 6177 { 6178 6179 $("#listing_form").find(".date_l").addClass("error"); 6180 6181 $("#listing_form").find(".date_l").after('<span class="error_message">Required</span>'); 6182 6183 //document.listing_form.date_l.focus(); 6184 6185 if(eval(count_bug)==0) 6186 6187 count_bug+=1; 6188 6189 } 6190 6191 /*if((new Date(document.listing_form.date_l.value)) < (new Date(document.listing_form.e_date_l.value))) 6192 6193 { 6194 6195 $("#listing_form").find(".e_date_l").addClass("error"); 6196 6197 $("#listing_form").find(".e_date_l").after("<span class='error_message'>End date can't be greater than start date.</span>"); 6198 6199 document.listing_form.e_date_l.focus(); 6200 6201 if(eval(count_bug)==0) 6202 6203 count_bug+=1; 6204 6205 }*/ 6206 6207 if (document.listing_form.location_l.value=="") 6208 6209 { 6210 6211 $("#listing_form").find(".location_l").addClass("error"); 6212 6213 $("#listing_form").find(".location_l").after('<span class="error_message">Required</span>'); 6214 6215 document.listing_form.location_l.focus(); 6216 6217 if(eval(count_bug)==0) 6218 6219 count_bug+=1; 6220 6221 } 6222 6223 if (document.listing_form.list_l.value=="") 6224 6225 { 6226 6227 $("#listing_form").find(".list_l").addClass("error"); 6228 6229 $("#listing_form").find(".list_l").after('<span class="error_message">Required</span>'); 6230 6231 document.listing_form.list_l.focus(); 6232 6233 if(eval(count_bug)==0) 6234 6235 count_bug+=1; 6236 6237 } 6238
6239 if (document.listing_form.title_l.value=="") 6240 6241 { 6242 6243 $("#listing_form").find(".title_l").addClass("error"); 6244 6245 $("#listing_form").find(".title_l").after('<span class="error_message">Required</span>'); 6246 6247 document.listing_form.title_l.focus(); 6248 6249 if(eval(count_bug)==0) 6250 6251 count_bug+=1; 6252 6253 } 6254 6255 if(listing_form.customCheck2.checked == false) 6256 6257 { 6258 6259 $("#listing_form").find(".custom-checkbox").after('<span class="error_message">Please agree to the Terms of Use.</span>'); 6260 6261 if(eval(count_bug)==0) 6262 6263 count_bug+=1; 6264 6265 } 6266 6267 else 6268 6269 { 6270 6271 $("#listing_form").find(".custom-checkbox").find(".error_message").remove(); 6272 6273 } 6274 6275 6276 6277 if(count_bug == 0) 6278 6279 { 6280 6281 $('#listing_form').attr('action','add_listing-next.php'); 6282 6283 //$("#signup_form").find("#signup_but").show(); 6284 6285 document.getElementById("listing_form").submit(); 6286 6287 } 6288 6289 else 6290 6291 { 6292 6293 $("#listing_form").find('._b').remove(); 6294 6295 $("#listing_form").find("#listing_but").show(); 6296 6297 event.stopPropagation(); 6298 6299 event.preventDefault(); 6300 6301 return false; 6302 6303 } 6304 6305 6306 6307 }); 6308 6309 6310 6311 //Listing form End 6312 6313 6314 6315 //Check image or not Start 6316 6317 6318 6319 //Banner 6320 6321 6322 6323 $("#customFile1").change(function(e) { 6324 6325 $("#listing_form").find(".error_message").remove(); 6326 6327 var typ = $("#customFile1").val(); 6328 6329 //alert(typ); 6330 6331 if(typ.match(".jpg")) 6332 6333 { 6334 6335 //do nothing 6336 6337 } 6338 6339 else if(typ.match(".jpeg")) 6340 6341 { 6342 6343 //do nothing 6344 6345 } 6346 6347 else if(typ.match(".png")) 6348 6349 { 6350 6351 //do nothing 6352 6353 } 6354 6355 else 6356 6357 { 6358 6359 $("#listing_form").find(".b_banner_l").after("<span class='error_message'>Only .jpg,.jpeg,.png file is valid</span>"); 6360 6361 $("#customFile1").val(''); 6362 6363 if(eval(count_bug)==0) 6364 6365 count_bug+=1; 6366 6367 } 6368 6369 }); 6370 6371 6372 6373 // For Image Name Start 6374 6375 $("#customFile1").click(function(e) { 6376 6377 $(this).addClass("customFile1"); 6378 6379 $(this).next(".custom-file-label").css({"z-index": "-1", "color": "#fff"}); 6380 6381 }); 6382 6383 // For Image Name End 6384 6385 6386 6387 //Lead Image 6388 6389 6390 6391 $("#customFile2").change(function(e) { 6392 6393 $("#listing_form").find(".error_message").remove(); 6394 6395 var typ = $("#customFile2").val(); 6396 6397 //alert(typ); 6398 6399 if(typ.match(".jpg")) 6400 6401 { 6402 6403 //do nothing 6404 6405 } 6406 6407 else if(typ.match(".jpeg")) 6408 6409 { 6410 6411 //do nothing 6412 6413 } 6414 6415 else if(typ.match(".png")) 6416 6417 { 6418 6419 //do nothing 6420 6421 } 6422 6423 else 6424 6425 { 6426 6427 $("#listing_form").find(".l_banner_l").after("<span class='error_message'>Only .jpg,.jpeg,.png file is valid</span>"); 6428 6429 $("#customFile2").val(''); 6430 6431 if(eval(count_bug)==0) 6432 6433 count_bug+=1; 6434 6435 } 6436 6437 }); 6438 6439 6440 6441 // For Image Name Start 6442 6443 $("#customFile2").click(function(e) { 6444 6445 $(this).addClass("customFile1"); 6446 6447 $(this).next(".custom-file-label").css({"z-index": "-1", "color": "#fff"}); 6448 6449 }); 6450 6451 // For Image Name End 6452 6453 6454 6455 //Mobile Banner 6456 6457 6458 6459 $("#customFile3").change(function(e) { 6460 6461 $("#listing_form").find(".error_message").remove(); 6462 6463 var typ = $("#customFile3").val(); 6464 6465 //alert(typ); 6466 6467 if(typ.match(".jpg")) 6468 6469 { 6470 6471 //do nothing 6472 6473 } 6474 6475 else if(typ.match(".jpeg")) 6476 6477 { 6478 6479 //do nothing 6480 6481 } 6482 6483 else if(typ.match(".png")) 6484 6485 { 6486 6487 //do nothing 6488 6489 } 6490 6491 else 6492 6493 6494 6495 { 6496 6497 $("#listing_form").find(".m_banner_l").after("<span class='error_message'>Only .jpg,.jpeg,.png file is valid</span>"); 6498 6499 $("#customFile3").val(''); 6500 6501 if(eval(count_bug)==0) 6502 6503 count_bug+=1; 6504 6505 } 6506 6507 }); 6508 6509 6510 6511 // For Image Name Start 6512 6513 $("#customFile3").click(function(e) { 6514 6515 $(this).addClass("customFile1"); 6516 6517 $(this).next(".custom-file-label").css({"z-index": "-1", "color": "#fff"}); 6518 6519 }); 6520 6521 // For Image Name End 6522 6523 6524 6525 //For End Date Min value start 6526 6527 6528 6529 $("#date_l").change(function(e) { 6530 6531 var min_date = $(this).val(); 6532 6533 //alert(min_date); 6534 6535 $('#e_date_l').val(''); 6536 6537 $('.closing_date').datepicker('destroy'); 6538 6539 //$('#e_date_l').attr('min',min_date); 6540 6541 $(".closing_date").datepicker( 6542 6543 { 6544 6545 dateFormat: 'yy-mm-dd', 6546 6547 minDate: new Date(min_date), // it will set minDate from 25 October 2009 6548 6549 }); 6550 6551 }); 6552 6553 6554 6555 //For End Date Min value End 6556 6557 6558 6559 6560 6561 //Check Image or Not End 6562 6563 6564 6565 //Check Banner Width and Height Start 6566 6567 /*var _URL = window.URL || window.webkitURL; 6568 6569 6570 6571 //Check Listing Banner Image Start 6572 6573 6574 6575 $("#customFile1").change(function(e) { 6576 6577 var file, img; 6578 6579 if ((file = this.files[0])) 6580 6581 { 6582 6583 img = new Image(); 6584 6585 img.onload = function() 6586 6587 { 6588 6589 var w = this.width; 6590 6591 var h = this.height; 6592 6593 if((w == 1250) && (h == 492)) 6594 6595 { 6596 6597 6598 6599 } 6600 6601 else 6602 6603 { 6604 6605 $("#listing_form").find(".b_banner_l").after("<span class='error_message'>Image Size is not match. Image width should be 1250px and height should be 492px.</span>"); 6606 6607 $("#customFile1").val(''); 6608 6609 } 6610 6611 }; 6612 6613 img.onerror = function() 6614 6615 { 6616 6617 $("#listing_form").find(".b_banner_l").after("<span class='error_message'>Invalid Image.</span>"); 6618 6619 $("#customFile1").val(''); 6620 6621 }; 6622 6623 img.src = _URL.createObjectURL(file); 6624 6625 } 6626 6627 });*/ 6628 6629 6630 6631 //Check Listing Banner Image End 6632 6633 6634 6635 6636 6637 //Email Specs Start 6638 6639 $('#email_specs_but').on("click",function() 6640 6641 { 6642 6643 event.preventDefault(); 6644 6645 $("#email_specs_form").find("#email_specs_but").hide(); 6646 6647 $("#email_specs_form").append('<span class="loader _w"> </span>'); 6648 6649 $("#email_specs_form").find(".s_email_r").removeClass("error"); 6650 6651 $("#email_specs_form").find(".error_message").remove(); 6652 6653 6654 6655 var count_bug=0; 6656 6657 6658 6659 if (document.email_specs_form.s_email_r.value=="") 6660 6661 { 6662 6663 $("#email_specs_form").find(".s_email_r").addClass("error"); 6664 6665 $("#email_specs_form").find(".s_email_r").after('<span class="error_message">Required</span>'); 6666 6667 document.email_specs_form.s_email_r.focus(); 6668 6669 if(eval(count_bug)==0) 6670 6671 count_bug+=1; 6672 6673 } 6674 6675 else 6676 6677 { 6678 6679 6680 6681 var emailIn = $( "#s_email_r" ).val(); 6682 6683 6684 6685 var check_email = check_email_now(emailIn); 6686 6687 6688 6689 //alert(emailIn); 6690 6691 if(check_email == false) 6692 6693 { 6694 6695 $("#email_specs_form").find(".s_email_r").addClass("error"); 6696 6697 $("#email_specs_form").find(".s_email_r").after("<span class='error_message'>Invalid Email Id</span>"); 6698 6699 document.email_specs_form.s_email_r.focus(); 6700 6701 count_bug+=1; 6702 6703 } 6704 6705 } 6706 6707 //alert(count_bug); 6708 6709 if(count_bug == 0) 6710 6711 { 6712 6713 s_email = document.email_specs_form.s_email_r.value; 6714 6715 article_id = document.email_specs_form.article_id_r.value; 6716 6717 name = document.email_specs_form.name_r.value; 6718 6719 email = document.email_specs_form.email_r.value; 6720 6721 usercode = document.email_specs_form.usercode_r.value; 6722 6723 6724 6725 $.post("email_specs-next.php",{s_email:s_email,article_id:article_id,name:name,email:email,usercode:usercode},function(result){ 6726 6727 $("#email_specs_form").find('._w').remove(); 6728 6729 //$('._w').remove(); 6730 6731 //alert(result); 6732 6733 if(result == 'ok') 6734 6735 { 6736 6737 $("#email_specs_form").find('._w').remove(); 6738 6739 $("#email_specs_form").find("#email_specs_but").show(); 6740 6741 $(".pop_insideText").html("<p class='info_text'>We just sent a email to "+s_email+"</p>"); 6742 6743 6744 6745 //$("#prefrence_popup").css("display", "block !important"); 6746 6747 } 6748 6749 }); 6750 6751 } 6752 6753 else 6754 6755 { 6756 6757 $("#email_specs_form").find('._w').remove(); 6758 6759 //$('._w').remove(); 6760 6761 $("#email_specs_form").find("#email_specs_but").show(); 6762 6763 event.stopPropagation(); 6764 6765 event.preventDefault(); 6766 6767 return false;
6768 6769 } 6770 6771 6772 6773 }); 6774 6775 //Email Specs End 6776 6777 6778 6779 6780 6781 6782 6783 //Calender Saved Start 6784 6785 6786 6787 $(document).on('click','.calender_saved',function() 6788 6789 { 6790 6791 var id = $(this).attr('id'); 6792 6793 var temp = 1; 6794 6795 $.ajax({ 6796 6797 type:'POST', 6798 6799 data:{id:id,temp:temp}, 6800 6801 url:'ajax_calender.php', 6802 6803 success:function(result) 6804 6805 { 6806 6807 var url = window.location.pathname; 6808 6809 var filename = url.substring(url.lastIndexOf('/')+1); 6810 6811 if(filename != 'reflect.php') 6812 6813 { 6814 6815 $('#'+id).html('<span class="r_cal">Remove from Calendar</span>'); 6816 6817 } 6818 6819 if(filename == '') 6820 6821 { 6822 6823 $('.r_cal').remove(); 6824 6825 } 6826 6827 //alert(result); 6828 6829 $('#'+id).append(result); 6830 6831 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 4000); 6832 6833 6834 6835 $('#'+id).parent('.calender_icon').addClass('active'); 6836 6837 $('#'+id).addClass('active'); 6838 6839 $('#'+id).addClass('calender_unsaved').removeClass('calender_saved'); 6840 6841 $('#'+id).find('.r_c').remove(); 6842 6843 } 6844 6845 }); 6846 6847 }); 6848 6849 6850 6851 //Calender Saved End 6852 6853 6854 6855 //Calender Un Saved Start 6856 6857 6858 6859 $(document).on('click','.calender_unsaved',function() 6860 6861 { 6862 6863 var id = $(this).attr('id'); 6864 6865 var temp = 2; 6866 6867 $.ajax({ 6868 6869 type:'POST', 6870 6871 data:{id:id,temp:temp}, 6872 6873 url:'ajax_calender.php', 6874 6875 success:function(result) 6876 6877 { 6878 6879 var url = window.location.pathname; 6880 6881 var filename = url.substring(url.lastIndexOf('/')+1); 6882 6883 if(filename != 'reflect.php') 6884 6885 { 6886 6887 $('#'+id).html('<span class="r_cal">Add to Calendar</span>'); 6888 6889 } 6890 6891 if(filename == '') 6892 6893 { 6894 6895 $('.r_cal').remove(); 6896 6897 } 6898 6899 //alert(result); 6900 6901 $('#'+id).append(result); 6902 6903 setTimeout(function(){ $('.bookmark_sucessful_tooltip').fadeOut();$('.bookmark_sucessful_tooltip').remove(); }, 4000); 6904 6905 6906 6907 6908 6909 $('#'+id).parent('.calender_icon').removeClass('active'); 6910 6911 $('#'+id).removeClass('active'); 6912 6913 $('#'+id).addClass('calender_saved').removeClass('calender_unsaved'); 6914 6915 $('#'+id).find('.r_c').remove(); 6916 6917 6918 6919 } 6920 6921 }); 6922 6923 }); 6924 6925 6926 6927 //Calender Un Saved End 6928 6929 6930 6931 //Reset Password Start 6932 6933 $(document).on('click','#reset_btn',function() 6934 6935 { 6936 6937 event.preventDefault(); 6938 6939 $("#reset_password").find("#reset_btn").hide(); 6940 6941 $("#reset_password").append('<span class="loader _b"> </span>'); 6942 6943 $(".co_password").find(".error_message").remove(); 6944 6945 $("#reset_password").find(".co_password").removeClass("error"); 6946 6947 $(".n_password").find(".error_message").remove(); 6948 6949 $("#reset_password").find(".n_password").removeClass("error"); 6950 6951 $("#reset_password").find(".error_message").remove(); 6952 6953 6954 6955 var count_bug=0; 6956 6957 if (document.reset_password.co_password.value=="") 6958 6959 { 6960 6961 $("#reset_password").find(".co_password").addClass("error"); 6962 6963 $(".co_password").after('<span class="error_message">Your password must be at least 8 chararacters long.</span>'); 6964 6965 document.reset_password.co_password.focus(); 6966 6967 if(eval(count_bug)==0) 6968 6969 count_bug+=1; 6970 6971 } 6972 6973 else if (document.reset_password.co_password.value.length <= 7) 6974 6975 { 6976 6977 $(".co_password").after('<span class="error_message">Minimum 8 characters required for password.</span>'); 6978 6979 document.reset_password.co_password.focus(); 6980 6981 if(eval(count_bug)==0) 6982 6983 count_bug+=1; 6984 6985 } 6986 6987 6988 6989 else if (document.reset_password.co_password.value != document.reset_password.n_password.value) 6990 6991 { 6992 6993 $(".co_password").after('<span class="error_message">Password does not match.</span>'); 6994 6995 document.reset_password.n_password.focus(); 6996 6997 //document.password_profile.co_password.focus(); 6998 6999 if(eval(count_bug)==0) 7000 7001 count_bug+=1; 7002 7003 } 7004 7005 7006 7007 var pswd = $('#n_password').val(); 7008 7009 //var regularExpression = /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]/; 7010 7011 var regularExpression = "^(?=.*[A-Z])(?=.*\\d)(?=.*[-+_!@#$%^&*.,?]).+$"; 7012 7013 //alert(pswd); 7014 7015 if (pswd == "") 7016 7017 { 7018 7019 $("#reset_password").find(".n_password").addClass("error"); 7020 7021 $("#reset_password").find(".n_password").after('<span class="error_message">Your new password must be at least 8 chararacters long.</span>'); 7022 7023 document.reset_password.n_password.focus(); 7024 7025 if(eval(count_bug)==0) 7026 7027 count_bug+=1; 7028 7029 } 7030 7031 else if(pswd.length <= 7) 7032 7033 { 7034 7035 $("#reset_password").find(".n_password").addClass("error"); 7036 7037 $("#reset_password").find(".n_password").after('<span class="error_message">Minimum 8 characters required for password.</span>'); 7038 7039 document.reset_password.n_password.focus(); 7040 7041 if(eval(count_bug)==0) 7042 7043 count_bug+=1; 7044 7045 } 7046 7047 else if(!(pswd.match(regularExpression))) 7048 7049 { 7050 7051 $("#reset_password").find(".n_password").addClass("error"); 7052 7053 //$("#reset_password").find(".n_password").after('<span class="error_message">Password must be contains one capital letter, one digit and one special character (!@#$%^&)</span>'); 7054 7055 $("#reset_password").find(".n_password").after('<span class="error_message">Password must contain one capital letter, one digit and one special character (!@#$%^&).</span>'); 7056 7057 document.reset_password.n_password.focus(); 7058 7059 if(eval(count_bug)==0) 7060 7061 count_bug+=1; 7062 7063 } 7064 7065 if(count_bug == 0) 7066 7067 { 7068 7069 var n_password = $('#n_password').val(); 7070 7071 var co_password = $('#co_password').val(); 7072 7073 var token = getUrlParameter('token'); 7074 7075 //alert(token); 7076 7077 $.post("reset-next.php",{token:token,n_password:n_password,co_password:co_password},function(result){ 7078 7079 //alert(result); 7080 7081 7082 7083 $("#reset_password").html(result); 7084 7085 7086 7087 7088 7089 }); 7090 7091 } 7092 7093 else 7094 7095 { 7096 7097 $("#reset_password").find('._b').remove(); 7098 7099 $("#reset_password").find("#reset_btn").show(); 7100 7101 event.stopPropagation(); 7102 7103 event.preventDefault(); 7104 7105 return false;
7106 7107 } 7108 7109 7110 7111 }); 7112 7113 7114 7115 //Reset Password End 7116 7117 7118 7119 //Header popup filter Start Here 7120 7121 7122 7123 7124 7125 //change filter prefrence start here 7126 7127 $(document).on('change','#preference_h',function() 7128 7129 { 7130 7131 //alert(); 7132 7133 var pref_h = $(this).val(); 7134 7135 var loc_h = $('#location_h').val(); 7136 7137 var med_h = $('#medium_h').val(); 7138 7139 var temp_filter = 1 ; 7140 7141 if(pref_h != '') 7142 7143 { 7144 7145 $.ajax({ 7146 7147 type:'POST', 7148 7149 url:'ajax_head_filter.php', 7150 7151 data:{pref_h:pref_h,loc_h:loc_h,med_h:med_h,temp_filter:temp_filter}, 7152 7153 success:function(result) 7154 7155 { 7156 7157 //alert(result); 7158 7159 $('#preference_h').parent().addClass('selected'); 7160 7161 $('#preference_h_chzn').after('<div class="pref_remove"></div>'); 7162 7163 7164 7165 var str = result.split("$$"); 7166 7167 if(str[0] == 'blank') 7168 7169 { 7170 7171 // Do nothing becoz its fixed 7172 7173 } 7174 7175 else 7176 7177 { 7178 7179 //alert(str[0]); 7180 7181 $('#location_h').html(str[0]); 7182 7183 $("#location_h").val('').trigger("liszt:updated"); 7184 7185 } 7186 7187 if(str[1] == 'blank') 7188 7189 { 7190 7191 // Do nothing becoz its fixed 7192 7193 } 7194 7195 else 7196 7197 { 7198 7199 //alert(str[1]); 7200 7201 $('#medium_h').html(str[1]); 7202 7203 $("#medium_h").val('').trigger("liszt:updated"); 7204 7205 } 7206 7207 } 7208 7209 }); 7210 7211 } 7212 7213 else 7214 7215 { 7216 7217 //do nothing becoz its fixed 7218 7219 } 7220 7221 }); 7222 7223 7224 7225 //change filter prefrence end here 7226 7227 7228 7229 //change filter location start here 7230 7231 7232 7233 $(document).on('change','#location_h',function() 7234 7235 { 7236 7237 //alert(); 7238 7239 var pref_h = $('#preference_h').val(); 7240 7241 var loc_h = $(this).val(); 7242 7243 var med_h = $('#medium_h').val(); 7244 7245 var temp_filter = 2 ; 7246 7247 if(loc_h != '') 7248 7249 { 7250 7251 $.ajax({ 7252 7253 type:'POST', 7254 7255 url:'ajax_head_filter.php', 7256 7257 data:{pref_h:pref_h,loc_h:loc_h,med_h:med_h,temp_filter:temp_filter}, 7258 7259 success:function(result) 7260 7261 { 7262 7263 //alert(result); 7264 7265 $('#location_h').parent().addClass('selected'); 7266 7267 $('#location_h_chzn').after('<div class="loc_remove"></div>'); 7268 7269 7270 7271 var str = result.split("$$"); 7272 7273 if(str[0] == 'blank') 7274 7275 { 7276 7277 // Do nothing becoz its fixed 7278 7279 } 7280 7281 else 7282 7283 { 7284 7285 //alert(str[0]); 7286 7287 $('#preference_h').html(str[0]); 7288 7289 $("#preference_h").val('').trigger("liszt:updated"); 7290 7291 } 7292 7293 if(str[1] == 'blank') 7294 7295 { 7296 7297 // Do nothing becoz its fixed 7298 7299 } 7300 7301 else 7302 7303 { 7304 7305 //alert(str[1]); 7306 7307 $('#medium_h').html(str[1]); 7308 7309 $("#medium_h").val('').trigger("liszt:updated"); 7310 7311 } 7312 7313 } 7314 7315 }); 7316 7317 } 7318 7319 else 7320 7321 { 7322 7323 //do nothing becoz its fixed 7324 7325 } 7326 7327 }); 7328 7329 7330 7331 //change filter location end here 7332 7333 7334 7335 //change filter medium start here 7336 7337 7338 7339 $(document).on('change','#medium_h',function() 7340 7341 { 7342 7343 //alert(); 7344 7345 var pref_h = $('#preference_h').val(); 7346 7347 var loc_h = $('#location_h').val(); 7348 7349 var med_h = $(this).val(); 7350 7351 var temp_filter = 3 ; 7352 7353 if(med_h != '') 7354 7355 { 7356 7357 $.ajax({ 7358 7359 type:'POST', 7360 7361 url:'ajax_head_filter.php', 7362 7363 data:{pref_h:pref_h,loc_h:loc_h,med_h:med_h,temp_filter:temp_filter}, 7364 7365 success:function(result) 7366 7367 { 7368 7369 //alert(result); 7370 7371 $('#medium_h').parent().addClass('selected'); 7372 7373 $('#medium_h_chzn').after('<div class="med_remove"></div>'); 7374 7375 7376 7377 var str = result.split("$$"); 7378 7379 if(str[0] == 'blank') 7380 7381 { 7382 7383 // Do nothing becoz its fixed 7384 7385 } 7386 7387 else 7388 7389 { 7390 7391 //alert(str[0]); 7392 7393 $('#preference_h').html(str[0]); 7394 7395 $("#preference_h").val('').trigger("liszt:updated"); 7396 7397 } 7398 7399 if(str[1] == 'blank') 7400 7401 { 7402 7403 // Do nothing becoz its fixed 7404 7405 } 7406 7407 else 7408 7409 { 7410 7411 //alert(str[1]); 7412 7413 $('#location_h').html(str[1]); 7414 7415 $("#location_h").val('').trigger("liszt:updated"); 7416 7417 } 7418 7419 } 7420 7421 }); 7422 7423 } 7424 7425 else 7426 7427 { 7428 7429 //do nothing becoz its fixed 7430 7431 } 7432 7433 }); 7434 7435 7436 7437 //change filter medium end here 7438 7439 7440 7441 //remove filter prefrence start here 7442 7443 7444 7445 $(document).on('click','.pref_remove',function() 7446 7447 { 7448 7449 //alert(); 7450 7451 var pref_h = $(this).val(); 7452 7453 var loc_h = $('#location_h').val(); 7454 7455 var med_h = $('#medium_h').val(); 7456 7457 var temp_filter = 1 ; 7458 7459 if(pref_h == '') 7460 7461 { 7462 7463 $.ajax({ 7464 7465 type:'POST', 7466 7467 url:'ajax_head_filter_fixed.php', 7468 7469 data:{pref_h:pref_h,loc_h:loc_h,med_h:med_h,temp_filter:temp_filter}, 7470 7471 success:function(result) 7472 7473 { 7474 7475 //alert(result); 7476 7477 var str = result.split("$$"); 7478 7479 7480 7481 $('#preference_h').parent().removeClass('selected'); 7482 7483 $('.pref_remove').remove(); 7484 7485 $('#preference_h').html(str[0]); 7486 7487 $("#preference_h").val('').trigger("liszt:updated"); 7488 7489 if(str[1] == 'blank') 7490 7491 { 7492
7493 // Do nothing becoz its fixed 7494 7495 } 7496 7497 else 7498 7499 { 7500 7501 //alert(str[1]); 7502 7503 $('#location_h').html(str[1]); 7504 7505 $("#location_h").val('').trigger("liszt:updated"); 7506 7507 } 7508 7509 if(str[2] == 'blank') 7510 7511 { 7512 7513 // Do nothing becoz its fixed 7514 7515 } 7516 7517 else 7518 7519 { 7520 7521 //alert(str[1]); 7522 7523 $('#medium_h').html(str[2]); 7524 7525 $("#medium_h").val('').trigger("liszt:updated"); 7526 7527 } 7528 7529 } 7530 7531 }); 7532 7533 } 7534 7535 else 7536 7537 { 7538 7539 //do nothing becoz its not fixed fixed 7540 7541 } 7542 7543 }); 7544 7545 7546 7547 //remove filter prefrence end here 7548 7549 7550 7551 //remove filter location start here 7552 7553 7554 7555 $(document).on('click','.loc_remove',function() 7556 7557 { 7558 7559 var pref_h = $('#preference_h').val(); 7560 7561 var loc_h = $(this).val(); 7562 7563 var med_h = $('#medium_h').val(); 7564 7565 var temp_filter = 2 ; 7566 7567 if(loc_h == '') 7568 7569 { 7570 7571 $.ajax({ 7572 7573 type:'POST', 7574 7575 url:'ajax_head_filter_fixed.php', 7576 7577 data:{pref_h:pref_h,loc_h:loc_h,med_h:med_h,temp_filter:temp_filter}, 7578 7579 success:function(result) 7580 7581 { 7582 7583 var str = result.split("$$"); 7584 7585 $('#location_h').parent().removeClass('selected'); 7586 7587 $('.loc_remove').remove(); 7588 7589 //alert(result); 7590 7591 $('#location_h').html(str[0]); 7592 7593 $("#location_h").val('').trigger("liszt:updated"); 7594 7595 if(str[1] == 'blank') 7596 7597 { 7598 7599 // Do nothing becoz its fixed 7600 7601 } 7602 7603 else 7604 7605 { 7606 7607 //alert(str[1]); 7608 7609 $('#preference_h').html(str[1]); 7610 7611 $("#preference_h").val('').trigger("liszt:updated"); 7612 7613 } 7614 7615 if(str[2] == 'blank') 7616 7617 { 7618 7619 // Do nothing becoz its fixed 7620 7621 } 7622 7623 else 7624 7625 { 7626 7627 //alert(str[1]); 7628 7629 $('#medium_h').html(str[2]); 7630 7631 $("#medium_h").val('').trigger("liszt:updated"); 7632 7633 } 7634 7635 7636 7637 } 7638 7639 }); 7640 7641 } 7642 7643 else 7644 7645 { 7646 7647 //do nothing becoz its not fixed fixed 7648 7649 } 7650 7651 }); 7652 7653 7654 7655 //remove filter location end here 7656 7657 7658 7659 //remove filter medium start here 7660 7661 7662 7663 $(document).on('click','.med_remove',function() 7664 7665 { 7666 7667 var pref_h = $('#preference_h').val(); 7668 7669 var loc_h = $('#location_h').val(); 7670 7671 var med_h = $(this).val(); 7672 7673 var temp_filter = 3 ; 7674 7675 if(med_h == '') 7676 7677 { 7678 7679 $.ajax({ 7680 7681 type:'POST', 7682 7683 url:'ajax_head_filter_fixed.php', 7684 7685 data:{pref_h:pref_h,loc_h:loc_h,med_h:med_h,temp_filter:temp_filter}, 7686 7687 success:function(result) 7688 7689 { 7690 7691 var str = result.split("$$"); 7692 7693 //alert(result); 7694 7695 $('#medium_h').parent().removeClass('selected'); 7696 7697 $('.med_remove').remove(); 7698 7699 $('#medium_h').html(str[0]); 7700 7701 $("#medium_h").val('').trigger("liszt:updated"); 7702 7703 if(str[1] == 'blank') 7704 7705 { 7706 7707 // Do nothing becoz its fixed 7708 7709 } 7710 7711 else 7712 7713 { 7714 7715 //alert(str[1]); 7716 7717 $('#preference_h').html(str[1]); 7718 7719 $("#preference_h").val('').trigger("liszt:updated"); 7720 7721 } 7722 7723 if(str[2] == 'blank') 7724 7725 { 7726 7727 // Do nothing becoz its fixed 7728 7729 } 7730 7731 else 7732 7733 { 7734 7735 //alert(str[1]); 7736 7737 $('#location_h').html(str[2]); 7738 7739 $("#location_h").val('').trigger("liszt:updated"); 7740 7741 } 7742 7743 } 7744 7745 }); 7746 7747 } 7748 7749 else 7750 7751 { 7752 7753 //do nothing becoz its not fixed fixed 7754 7755 } 7756 7757 }); 7758 7759 7760 7761 7762 7763 //remove filter medium end here 7764 7765 7766 7767 //Header popup filter End Here 7768 7769 7770 7771 7772 7773 //Social Media profession start here 7774 7775 7776 7777 //Check Prfession start 7778 7779 7780 7781 $(document).on('change','.check_s_prof',function() 7782 7783 { 7784 7785 var pro = $( "#check_s_prof" ).val(); 7786 7787 //alert(pro+"<-tester"); 7788 7789 if((pro == 'Specialist Consultant') || (pro == 'Other')) 7790 7791 { 7792 7793 $("#prof_form_s").find(".profession_other").fadeIn('fast'); 7794 7795 $("#prof_form_s").find("#check_s_prof_other").prop('required',true); 7796 7797 } 7798 7799 else 7800 7801 { 7802 7803 $("#prof_form_s").find("#check_s_prof_other").prop('required',false); 7804 7805 $("#prof_form_s").find(".profession_other").fadeOut('slow'); 7806 7807 } 7808 7809 }); 7810 7811 7812 7813 //Check Profession End 7814 7815 7816 7817 $(document).on('click','#social_profession',function() 7818 7819 { 7820 7821 //alert('social_profession'); 7822 7823 $("#prof_form_s").find("#social_profession").hide(); 7824 7825 $("#prof_form_s").append('<span class="loader _w"> </span>'); 7826 7827 $("#prof_form_s").find(".error_message").remove(); 7828 7829 $("#prof_form_s").find(".profession").removeClass("error"); 7830 7831 $("#prof_form_s").find(".profession_other").removeClass("error"); 7832 7833 7834 7835 var count_bug=0; 7836 7837 7838 7839 7840 7841 if (document.prof_form_s.check_s_prof.value=="") 7842 7843 { 7844 7845 $("#prof_form_s").find(".profession").addClass("error"); 7846 7847 $("#prof_form_s").find(".profession").after('<span class="error_message">Required</span>'); 7848 7849 document.prof_form_s.check_s_prof.focus(); 7850 7851 if(eval(count_bug)==0) 7852 7853 count_bug+=1; 7854 7855 7856 7857 } 7858 7859 else if((document.prof_form_s.check_s_prof.value == 'Specialist Consultant') || (document.prof_form_s.check_s_prof.value == 'Other')) 7860 7861 { 7862 7863 7864 7865 if (document.prof_form_s.check_s_prof_other.value=="") 7866 7867 { 7868 7869 $("#prof_form_s").find(".profession_other").addClass("error"); 7870 7871 $("#prof_form_s").find(".profession_other").after('<span class="error_message">Required</span>'); 7872 7873 document.prof_form_s.check_s_prof_other.focus(); 7874 7875 if(eval(count_bug)==0) 7876 7877 count_bug+=1; 7878 7879 } 7880 7881 7882 7883 } 7884 7885 if(count_bug == 0) 7886 7887 { 7888 7889 var profession = document.prof_form_s.check_s_prof.value; 7890 7891 if((document.prof_form_s.check_s_prof.value == 'Specialist Consultant') || (document.prof_form_s.check_s_prof.value == 'Other')) 7892 7893 { 7894 7895 var profession_other = document.prof_form_s.check_s_prof_other.value; 7896 7897 } 7898 7899 else 7900 7901 { 7902 7903 var profession_other = ''; 7904 7905 } 7906 7907 //alert(profession); 7908 7909 //alert(profession_other); 7910 7911 $.post("social-profession-next.php",{profession:profession,profession_other:profession_other},function(result){ 7912 7913 $("#prof_form_s").find('._w').remove(); 7914 7915 //$('._w').remove(); 7916 7917 //$("#prof_sec").html(result); 7918 7919 }); 7920 7921 } 7922 7923 else 7924 7925 { 7926 7927 $("#prof_form_s").find('._w').remove(); 7928 7929 //$('._w').remove(); 7930 7931 $("#prof_form_s").find("#social_profession").show(); 7932 7933 event.stopPropagation(); 7934 7935 event.preventDefault(); 7936 7937 return false;
7938 7939 } 7940 7941 }); 7942 7943 7944 7945 //Social Media profession end here 7946 7947 7948 7949 7950 7951 7952 7953//M's Function End 7954 7955 7956 7957 7958 7959//Multiple Checked Values Start 7960 7961 7962 7963function multiple_values(inputclass) 7964 7965{ 7966 7967 var val = new Array(); 7968 7969 $("."+inputclass+":checked").each(function() { 7970 7971 val.push($(this).val()); 7972 7973 }); 7974 7975 return val; 7976 7977 //alert(val); 7978 7979} 7980 7981//Multiple Checked Values End 7982 7983//Check STRING is URL start here 7984 7985function validURL(str) { 7986 7987 var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol 7988 7989 '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name 7990 7991 '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address 7992 7993 '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path 7994 7995 '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string 7996 7997 '(\\#[-a-z\\d_]*)?$','i'); // fragment locator 7998 7999 return !!pattern.test(str); 8000 8001} 8002 8003//Check STRING is URL End here 8004 8005 8006 8007//Url Get Parameter Function Start 8008 8009 8010 8011var getUrlParameter = function getUrlParameter(sParam) { 8012 8013 var sPageURL = window.location.search.substring(1), 8014 8015 sURLVariables = sPageURL.split('&'), 8016 8017 sParameterName, 8018 8019 i; 8020 8021 8022 8023 for (i = 0; i < sURLVariables.length; i++) { 8024 8025 sParameterName = sURLVariables[i].split('='); 8026 8027 8028 8029 if (sParameterName[0] === sParam) { 8030 8031 return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); 8032 8033 } 8034 8035 } 8036 8037}; 8038 8039 8040 8041 8042 8043//Url Get Parameter Function End 8044 8045 8046 8047//Check Email Now Start 8048 8049 8050 8051function check_email_now(email_val) 8052 8053{ 8054 8055 //alert(email_val); 8056 8057 var isEmailOk = false; 8058 8059 var filter = /^[a-zA-Z0-9][a-zA-Z0-9._-]*\@[a-zA-Z0-9-]+(\.[a-zA-Z][a-zA-Z-]+)+$/; 8060 8061 8062 8063 if(email_val.search(filter) != -1) 8064 8065 { 8066 8067 isEmailOk = true; 8068 8069 } 8070 8071 if(email_val.indexOf("..") != -1) 8072 8073 { 8074 8075 isEmailOk = false; 8076 8077 } 8078 8079 if(email_val.indexOf(".@") != -1) 8080 8081 { 8082 8083 isEmailOk = false; 8084 8085 } 8086 8087 //alert(isEmailOk); 8088 8089 return isEmailOk; 8090 8091} 8092 8093 8094 8095 8096 8097//Check Email Now End 8098 8099 8100 8101 8102 8103 $(document).ready(function() { 8104 8105 8106 8107 var url = window.location.pathname; 8108 8109 var filename = url.substring(url.lastIndexOf('/')+1); 8110 8111 //alert(filename); 8112 8113 if(filename == 'filters-results.php') 8114 8115 { 8116 8117 var pref = getUrlParameter('category'); 8118 8119 var loc = getUrlParameter('location'); 8120 8121 var kd = getUrlParameter('medium'); 8122 8123 if(pref === undefined) 8124 8125 { 8126 8127 //alert('test'); 8128 8129 $('#preference_h').after('<div class="pref_remove"></div>'); 8130 8131 $('.pref_remove').click(); 8132 8133 } 8134 8135 else 8136 8137 { 8138 8139 $('#preference_h').after('<div class="pref_remove"></div>'); 8140 8141 $('#preference_h').parent().addClass('selected'); 8142 8143 //alert('3'); 8144 8145 } 8146 8147 if(loc === undefined) 8148 8149 { 8150 8151 //alert('test'); 8152 8153 $('#location_h').after('<div class="loc_remove"></div>'); 8154 8155 $('.loc_remove').click(); 8156 8157 } 8158 8159 else 8160 8161 { 8162 8163 $('#location_h').after('<div class="loc_remove"></div>'); 8164 8165 $('#location_h').parent().addClass('selected'); 8166 8167 //alert('3'); 8168 8169 } 8170 8171 if(kd === undefined) 8172 8173 { 8174 8175 //alert('test'); 8176 8177 $('#medium_h').after('<div class="med_remove"></div>'); 8178 8179 $('.med_remove').click(); 8180 8181 } 8182 8183 else 8184 8185 { 8186 8187 $('#medium_h').after('<div class="med_remove"></div>'); 8188 8189 $('#medium_h').parent().addClass('selected'); 8190 8191 //alert('3'); 8192 8193 } 8194 8195 } 8196 8197 else 8198 8199 { 8200 8201 //alert('2'); 8202 8203 } 8204 8205 }); 8206 8207 8208 8209 //Filter load more start here 8210 8211 $(document).on('click','.tag_load_more',function() 8212 8213 { 8214 8215 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 8216 8217 8218 8219 var o_id = $(this).attr('id'); 8220 8221 8222 8223 var str = o_id.split("_"); 8224 8225 8226 8227 var id = str[1]; 8228 8229 8230 8231 var q = $("#q").val(); 8232 8233 8234 8235 $('.btn.tag_load_more').hide(); 8236 8237 $('.loding').show(); 8238 8239 $.ajax({ 8240 8241 type:'POST', 8242 8243 url:'ajax_tag_result.php', 8244 8245 data:{id:id,q:q}, 8246 8247 success:function(html) 8248 8249 { 8250 8251 $('.loadmore_btn').remove(); 8252 8253 //alert(html); 8254 8255 $('#row').append(html); 8256 8257 } 8258 8259 }); 8260 8261 }); 8262 8263 //Filter load more end here 8264 8265 8266 8267 //Instagram load more start here 8268 8269 $(document).on('click','.insta_load',function() 8270 8271 { 8272 8273 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 8274 8275 8276 8277 var o_id = $(this).attr('id'); 8278 8279 8280 8281 var str = o_id.split("_"); 8282 8283 8284 8285 var id = str[1]; 8286 8287 8288 8289 8290 8291 $('.btn.insta_load').hide(); 8292 8293 $('.loding').show(); 8294 8295 $.ajax({ 8296 8297 type:'POST', 8298 8299 url:'ajax_instagram.php', 8300 8301 data:{id:id}, 8302 8303 success:function(html) 8304 8305 { 8306 8307 $('.loadmore_btn').remove(); 8308 8309 //alert(html); 8310 8311 $('#row').append(html); 8312 8313 } 8314 8315 }); 8316 8317 }); 8318 8319 //Instagram load more end here 8320 8321 8322 8323 8324 8325 //Author load more start here
8326 8327 $(document).on('click','.author_load_more',function() 8328 8329 { 8330 8331 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 8332 8333 8334 8335 var o_id = $(this).attr('id'); 8336 8337 8338 8339 var str = o_id.split("_"); 8340 8341 8342 8343 var id = str[1]; 8344 8345 8346 8347 var q = $("#q").val(); 8348 8349 8350 8351 $('.btn.author_load_more').remove(); 8352 8353 $('.loding').show(); 8354 8355 $.ajax({ 8356 8357 type:'POST', 8358 8359 url:'ajax_author_result.php', 8360 8361 data:{id:id,q:q}, 8362 8363 success:function(html) 8364 8365 { 8366 8367 $('.loadmore_btn').remove(); 8368 8369 //alert(html); 8370 8371 $('#row').append(html); 8372 8373 } 8374 8375 }); 8376 8377 }); 8378 8379 //Author load more end here 8380 8381 8382 8383 8384 8385 //Curator load more start here 8386 8387 $(document).on('click','.curator_load_more',function() 8388 8389 { 8390 8391 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 8392 8393 8394 8395 var o_id = $(this).attr('id'); 8396 8397 8398 8399 var str = o_id.split("_"); 8400 8401 8402 8403 var id = str[1]; 8404 8405 8406 8407 var q = $("#qc").val(); 8408 8409 8410 8411 $('.btn.curator_load_more').remove(); 8412 8413 $('.loding').show(); 8414 8415 $.ajax({ 8416 8417 type:'POST', 8418 8419 url:'ajax_curator_result.php', 8420 8421 data:{id:id,q:q}, 8422 8423 success:function(html) 8424 8425 { 8426 8427 $('.loadmore_btn').remove(); 8428 8429 //alert(html); 8430 8431 $('#rowc').append(html); 8432 8433 } 8434 8435 }); 8436 8437 }); 8438 8439 //Curator load more end here 8440 8441 8442 8443 8444 8445 //Flag Value start here 8446 8447 $(document).on('click','.thumbnail_tag',function() 8448 8449 { 8450 8451 event.stopPropagation(); 8452 8453 event.preventDefault(); 8454 8455 var f_val = $(this).attr('class'); 8456 8457 //alert(f_val) 8458 8459 var flag = f_val.split(" "); 8460 8461 var flag_value = flag[2]; 8462 8463 //alert(flag_value); 8464 8465 /*if(flag_value == 'drawingboard') 8466 8467 { 8468 8469 flag_value = 'drawing-board'; 8470 8471 } 8472 8473 else if(flag_value == 'photoessay') 8474 8475 { 8476 8477 flag_value = 'photo-essay'; 8478 8479 } 8480 8481 else if(flag_value == 'climatecovid') 8482 8483 { 8484 8485 flag_value = 'climate-vs-covid-19'; 8486 8487 } 8488 8489 else if(flag_value == 'designluminaries') 8490 8491 { 8492 8493 flag_value = 'design-luminaries'; 8494 8495 } 8496 8497 else if(flag_value == 'designaftercovid') 8498 8499 { 8500 8501 flag_value = 'design-after-covid-19'; 8502 8503 } 8504 8505 else 8506 8507 { 8508 8509 flag_value = flag_value; 8510 8511 }*/ 8512 8513 //var host_name = window.location.hostname; 8514 8515 //alert('flag-'+flag_value); 8516 8517 window.location = flag_value; 8518 8519 }); 8520 8521 //Flag Value end here 8522 8523 8524 8525 //Flag load more start here 8526 8527 $(document).on('click','.flag_load_more',function() 8528 8529 { 8530 8531 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 8532 8533 8534 8535 var o_id = $(this).attr('id'); 8536 8537 8538 8539 var str = o_id.split("_"); 8540 8541 8542 8543 var id = str[1]; 8544 8545 8546 8547 var q = $("#q").val(); 8548 8549 8550 8551 $('.btn.flag_load_more').remove(); 8552 8553 $('.loding').show(); 8554 8555 $.ajax({ 8556 8557 type:'POST', 8558 8559 url:'ajax_flag_result.php', 8560 8561 data:{id:id,q:q}, 8562 8563 success:function(html) 8564 8565 { 8566 8567 $('._b').remove(); 8568 8569 //alert(html); 8570 8571 $('#row').append(html); 8572 8573 } 8574 8575 }); 8576 8577 }); 8578 8579 //Flag load more end here 8580 8581 8582 8583 //Work_job Value start here 8584 8585 $(document).on('click','.work_job',function() 8586 8587 { 8588 8589 event.stopPropagation(); 8590 8591 event.preventDefault(); 8592 8593 var a_val = $.trim($(this).html()).toLowerCase(); 8594 8595 //alert(a_val); 8596 8597 window.location = 'explore-'+a_val; 8598 8599 }); 8600 8601 //Work_job Value end here 8602 8603 8604 8605 //Work_job load more start here 8606 8607 $(document).on('click','.article_type_load_more',function() 8608 8609 { 8610 8611 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 8612 8613 8614 8615 var o_id = $(this).attr('id'); 8616 8617 8618 8619 var str = o_id.split("_"); 8620 8621 8622 8623 var id = str[1]; 8624 8625 8626 8627 var q = $("#q").val(); 8628 8629 8630 8631 $('.btn.article_type_load_more').remove(); 8632 8633 $('.loding').show(); 8634 8635 $.ajax({ 8636 8637 type:'POST', 8638 8639 url:'ajax_article_type_result.php', 8640 8641 data:{id:id,q:q}, 8642 8643 success:function(html) 8644 8645 { 8646 8647 $('._b').remove(); 8648 8649 //alert(html); 8650 8651 $('#row').append(html); 8652 8653 } 8654 8655 }); 8656 8657 }); 8658 8659 //Work_job load more end here 8660 8661 8662 8663 //Check session exist or not start here 8664 8665 8666 8667 function check_session(callback) 8668 8669 { 8670 8671 var session_val; 8672 8673 $.ajax({ 8674 8675 type:'POST', 8676 8677 url:'ajax_check_session.php', 8678 8679 success:function(html) 8680 8681 { 8682 8683 session_val = html; 8684 8685 callback(session_val); 8686 8687 } 8688 8689 }); 8690 8691 } 8692 8693 //Check session exist or not end here 8694 8695 8696 8697 // register auto open start here
8698 8699 8700 8701 var str = window.location.href; 8702 8703 var myarr = str.split("#"); 8704 8705 var myarr_length = myarr.length; 8706 8707 var str_val = myarr[myarr_length - 1]; 8708 8709 8710 8711 if(str_val == 'signup') 8712 8713 { 8714 8715 check_session(function(session_exist){ 8716 8717 if(session_exist == 'false') 8718 8719 { 8720 8721 $('#signup_popup').fadeIn(); 8722 8723 } 8724 8725 else 8726 8727 { 8728 8729 } 8730 8731 }); 8732 8733 8734 8735 8736 8737 } 8738 8739 8740 8741 // register auto open end here 8742 8743 8744 8745 //Ad track start here 8746 8747 $(document).on('click','.tc',function() 8748 8749 { 8750 8751 //event.stopPropagation(); 8752 8753 //event.preventDefault(); 8754 8755 8756 8757 var o_id = $(this).attr('id'); 8758 8759 8760 8761 //alert(o_id); 8762 8763 $.ajax({ 8764 8765 type:'POST', 8766 8767 url:'ajax_ad_track.php', 8768 8769 data:{o_id:o_id}, 8770 8771 success:function(html) 8772 8773 { 8774 8775 //alert(html); 8776 8777 } 8778 8779 }); 8780 8781 }); 8782 8783 //Ad track end here 8784 8785 8786 8787 // For Stirring-conversation Main Page start here 8788 8789 $(document).on('click','.str_con',function() 8790 8791 { 8792 8793 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 8794 8795 8796 8797 var o_id = $(this).attr('id'); 8798 8799 8800 8801 var str = o_id.split("_"); 8802 8803 8804 8805 var id = str[1]; 8806 8807 8808 8809 //alert(id); 8810 8811 8812 8813 var fixed_id = $("#fixed_id").val(); 8814 8815 $('.btn.str_con').remove(); 8816 8817 $.ajax({ 8818 8819 type:'POST', 8820 8821 url:'ajax_stirring_conversation.php', 8822 8823 data:{id:id,fixed_id:fixed_id}, 8824 8825 success:function(html) 8826 8827 { 8828 8829 $('._b').remove(); 8830 8831 //alert(html); 8832 8833 $('#row').append(html); 8834 8835 } 8836 8837 }); 8838 8839 }); 8840 8841 // For Stirring-conversation Main Page end here 8842 8843 8844 8845 // For Stirring-conversation Menu start here 8846 8847 $(document).on('click','.con_view_all',function() 8848 8849 { 8850 8851 8852 8853 //var o_id = $(this).attr('id'); 8854 8855 8856 8857 //var str = o_id.split("_"); 8858 8859 8860 8861 //var id = str[1]; 8862 8863 var id = $(".con_rand").text(); 8864 8865 //alert(id); 8866 8867 8868 8869 $('.con_view_all').remove(); 8870 8871 $.ajax({ 8872 8873 type:'POST', 8874 8875 url:'ajax_stirring_conversation_menu.php', 8876 8877 data:{id:id}, 8878 8879 success:function(html) 8880 8881 { 8882 8883 $('#str_con_menu').append(html); 8884 8885 } 8886 8887 }); 8888 8889 }); 8890 8891 // For Stirring-conversation Menu start here 8892 8893 8894 8895 // For Stirring-conversation Next Page start here 8896 8897 $(document).on('click','.str_con_nxt',function() 8898 8899 { 8900 8901 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 8902 8903 8904 8905 var o_id = $(this).attr('id'); 8906 8907 8908 8909 var str = o_id.split("_"); 8910 8911 8912 8913 var id = str[1]; 8914 8915 8916 8917 //alert(id); 8918 8919 8920 8921 var fixed_id = $("#fixed_id").val(); 8922 8923 $('.btn.str_con_nxt').remove(); 8924 8925 $.ajax({ 8926 8927 type:'POST', 8928 8929 url:'ajax_conversation-next.php', 8930 8931 data:{id:id,fixed_id:fixed_id}, 8932 8933 success:function(html) 8934 8935 { 8936 8937 $('._b').remove(); 8938 8939 //alert(html); 8940 8941 $('#row').append(html); 8942 8943 } 8944 8945 }); 8946 8947 }); 8948 8949 // For Stirring-conversation Next Page end here 8950 8951 8952 8953 8954 8955 8956 8957 //Becoming Form Start 8958 8959 8960 8961 $('#become_but').on("click",function() 8962 8963 { 8964 8965 //alert('1'); 8966 8967 event.preventDefault(); 8968 8969 $("#become_form").find("#contact_but").hide(); 8970 8971 $("#become_form").append('<span class="loader _w"> </span>'); 8972 8973 $("#become_form").find("#message_b").removeClass("error"); 8974 8975 $("#become_form").find("#email_b").removeClass("error"); 8976 8977 $("#become_form").find("#lname_b").removeClass("error"); 8978 8979 $("#become_form").find("#fname_b").removeClass("error"); 8980 8981 $("#become_form").find(".error_message").remove(); 8982 8983 //alert('2'); 8984 8985 //alert(document.become_form.message_b.value) 8986 8987 var count_bug=0; 8988 8989 if (document.become_form.message_b.value=="") 8990 8991 { 8992 8993 $("#become_form").find("#message_b").addClass("error"); 8994 8995 $("#become_form").find("#message_b").after('<span class="error_message">Required</span>'); 8996 8997 document.become_form.message_b.focus(); 8998 8999 if(eval(count_bug)==0) 9000 9001 count_bug+=1; 9002 9003 } 9004 9005 9006 9007 if (document.become_form.email_b.value=="") 9008 9009 { 9010 9011 $("#become_form").find("#email_b").addClass("error"); 9012 9013 $("#become_form").find("#email_b").after('<span class="error_message">Required</span>'); 9014 9015 document.become_form.email_b.focus(); 9016 9017 if(eval(count_bug)==0) 9018 9019 count_bug+=1; 9020 9021 } 9022 9023 else 9024 9025 { 9026 9027 var emailIn = $( "#email_bn" ).val(); 9028 9029 //alert(emailIn); 9030 9031 9032 9033 var check_email = check_email_now(emailIn); 9034 9035 9036 9037 if(check_email == false) 9038 9039 { 9040 9041 $("#become_form").find("#email_b").addClass("error"); 9042 9043 $("#email_b").parent().append('<span class="error_message">Invalid Email Id</span>'); 9044 9045 //$("#become_form").find(".error_message").html('Invalid Email Id'); 9046 9047 document.become_form.email_b.focus(); 9048 9049 count_bug+=1; 9050 9051 } 9052 9053 } 9054 9055 if (document.become_form.fname_b.value=="") 9056 9057 { 9058 9059 $("#become_form").find("#fname_b").addClass("error"); 9060 9061 $("#become_form").find("#fname_b").after('<span class="error_message">Required</span>'); 9062
9063 document.become_form.fname_b.focus(); 9064 9065 if(eval(count_bug)==0) 9066 9067 count_bug+=1; 9068 9069 } 9070 9071 9072 9073 if(count_bug == 0) 9074 9075 { 9076 9077 email = document.become_form.email_b.value; 9078 9079 message = document.become_form.message_b.value; 9080 9081 fname = document.become_form.fname_b.value; 9082 9083 //captcha_response = document.become_form.captcha_response.value; 9084 9085 9086 9087 //alert(email); 9088 9089 $.post("become-next.php",{email:email,message:message,fname:fname},function(result){ 9090 9091 //alert(result); 9092 9093 $("#become_form").html(result); 9094 9095 //$("#become_form").find('._w').remove(); 9096 9097 //$("#become_form").find("#contact_but").show(); 9098 9099 9100 9101 document.become_form.email_b.value = ''; 9102 9103 document.become_form.message_b.value = ''; 9104 9105 document.become_form.fname_b.value = ''; 9106 9107 9108 9109 //setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 9110 9111 }); 9112 9113 } 9114 9115 else 9116 9117 { 9118 9119 //alert('a'); 9120 9121 $("#become_form").find('._w').remove(); 9122 9123 $("#become_form").find("#become_but").show(); 9124 9125 event.stopPropagation(); 9126 9127 event.preventDefault(); 9128 9129 return false; 9130 9131 } 9132 9133 9134 9135 }); 9136 9137 9138 9139 //Becoming form End 9140 9141 9142 9143 9144 9145 9146 9147 //Becoming Form Start 9148 9149 9150 9151 $('#become_but1').on("click",function() 9152 9153 { 9154 9155 //alert('1'); 9156 9157 event.preventDefault(); 9158 9159 $("#become_form").find("#become_but1").hide(); 9160 9161 $("#become_form").append('<span class="loader _w"> </span>'); 9162 9163 $("#become_form").find("#message_b").removeClass("error"); 9164 9165 $("#become_form").find("#email_b").removeClass("error"); 9166 9167 $("#become_form").find("#lname_b").removeClass("error"); 9168 9169 $("#become_form").find("#fname_b").removeClass("error"); 9170 9171 $("#become_form").find(".error_message").remove(); 9172 9173 //alert('2'); 9174 9175 //alert(document.become_form.message_b.value) 9176 9177 var count_bug=0; 9178 9179 9180 9181 if (document.become_form.captcha_response.value=="") 9182 9183 { 9184 9185 $("#resp").css({border:'1px solid #c80909'}); 9186 9187 $("#resp").css({width:'304px'}); 9188 9189 $("#resp").css({height:'78px'}); 9190 9191 if(eval(count_bug)==0) 9192 9193 count_bug+=1; 9194 9195 } 9196 9197 if (document.become_form.message_b.value=="") 9198 9199 { 9200 9201 $("#become_form").find("#message_b").addClass("error"); 9202 9203 $("#become_form").find("#message_b").after('<span class="error_message">Required</span>'); 9204 9205 document.become_form.message_b.focus(); 9206 9207 if(eval(count_bug)==0) 9208 9209 count_bug+=1; 9210 9211 } 9212 9213 9214 9215 if (document.become_form.email_b.value=="") 9216 9217 { 9218 9219 $("#become_form").find("#email_b").addClass("error"); 9220 9221 $("#become_form").find("#email_b").after('<span class="error_message">Required</span>'); 9222 9223 document.become_form.email_b.focus(); 9224 9225 if(eval(count_bug)==0) 9226 9227 count_bug+=1; 9228 9229 } 9230 9231 else 9232 9233 { 9234 9235 var emailIn = $( "#email_bn" ).val(); 9236 9237 //alert(emailIn); 9238 9239 9240 9241 var check_email = check_email_now(emailIn); 9242 9243 9244 9245 if(check_email == false) 9246 9247 { 9248 9249 $("#become_form").find("#email_b").addClass("error"); 9250 9251 $("#email_b").parent().append('<span class="error_message">Invalid Email Id</span>'); 9252 9253 //$("#become_form").find(".error_message").html('Invalid Email Id'); 9254 9255 document.become_form.email_b.focus(); 9256 9257 count_bug+=1; 9258 9259 } 9260 9261 } 9262 9263 9264 9265 if (document.become_form.fname_b.value=="") 9266 9267 { 9268 9269 $("#become_form").find("#fname_b").addClass("error"); 9270 9271 $("#become_form").find("#fname_b").after('<span class="error_message">Required</span>'); 9272 9273 document.become_form.fname_b.focus(); 9274 9275 if(eval(count_bug)==0) 9276 9277 count_bug+=1; 9278 9279 } 9280 9281 9282 9283 if(count_bug == 0) 9284 9285 { 9286 9287 email = document.become_form.email_b.value; 9288 9289 message = document.become_form.message_b.value; 9290 9291 fname = document.become_form.fname_b.value; 9292 9293 captcha_response = document.become_form.captcha_response.value; 9294 9295 9296 9297 //alert(email); 9298 9299 $.post("become-next1.php",{email:email,message:message,fname:fname,captcha_response:captcha_response},function(result){ 9300 9301 //alert(result); 9302 9303 $("#become_form").html(result); 9304 9305 //$("#become_form").find('._w').remove(); 9306 9307 //$("#become_form").find("#contact_but").show(); 9308 9309 9310 9311 document.become_form.email_b.value = ''; 9312 9313 document.become_form.message_b.value = ''; 9314 9315 document.become_form.fname_b.value = ''; 9316 9317 9318 9319 //setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 9320 9321 }); 9322 9323 } 9324 9325 else 9326 9327 { 9328 9329 //alert('a'); 9330 9331 $("#become_form").find('._w').remove(); 9332 9333 $("#become_form").find("#become_but1").show(); 9334 9335 event.stopPropagation(); 9336 9337 event.preventDefault(); 9338 9339 return false;
9340 9341 } 9342 9343 9344 9345 }); 9346 9347 9348 9349 9350 9351//Voting code start here 9352 9353 9354 9355//Check Prfession start 9356 9357 9358 9359$(document).on('change','.voter_prof',function() 9360 9361{ 9362 9363 var pro = $( "#voter_prof" ).val(); 9364 9365 //alert(pro+"<-tester"); 9366 9367 if((pro == 'Specialist Consultant') || (pro == 'Other')) 9368 9369 { 9370 9371 $(".profession_other").fadeIn('fast'); 9372 9373 $(".profession_other").prop('required',true); 9374 9375 } 9376 9377 else 9378 9379 { 9380 9381 $(".profession_other").prop('required',false); 9382 9383 $(".profession_other" ).fadeOut('slow'); 9384 9385 } 9386 9387}); 9388 9389 9390 9391//Check Profession End 9392 9393 9394 9395//Voter Form Start 9396 9397 9398 9399//$(document).on('click','#voter_but',function() 9400 9401 9402 9403$('#voter_but').on("click",function() 9404 9405{ 9406 9407 //alert('1'); 9408 9409 event.stopPropagation(); 9410 9411 event.preventDefault(); 9412 9413 $("#voter_form").find("#voter_but").hide(); 9414 9415 $("#voter_form").append('<span class="loader _b"> </span>'); 9416 9417 $("#voter_form").find(".error_message").remove(); 9418 9419 $("#voter_form").find(".password").removeClass("error"); 9420 9421 $("#voter_form").find(".profession").removeClass("error"); 9422 9423 $("#voter_form").find(".profession_other").removeClass("error"); 9424 9425 $("#voter_form").find(".email").removeClass("error"); 9426 9427 $("#voter_form").find(".user").removeClass("error"); 9428 9429 9430 9431 var count_bug=0; 9432 9433 9434 9435 if (document.voter_form.voter_prof.value=="") 9436 9437 { 9438 9439 $("#voter_form").find(".profession").addClass("error"); 9440 9441 $("#voter_form").find(".profession").after('<span class="error_message">Required</span>'); 9442 9443 document.voter_form.voter_prof.focus(); 9444 9445 if(eval(count_bug)==0) 9446 9447 count_bug+=1; 9448 9449 } 9450 9451 else if((document.voter_form.voter_prof.value == 'Specialist Consultant') || (document.voter_form.voter_prof.value == 'Other')) 9452 9453 { 9454 9455 9456 9457 if (document.voter_form.voter_prof_other.value=="") 9458 9459 { 9460 9461 $("#voter_form").find(".profession_other").addClass("error"); 9462 9463 $("#voter_form").find(".profession_other").after('<span class="error_message">Required</span>'); 9464 9465 document.voter_form.voter_prof_other.focus(); 9466 9467 if(eval(count_bug)==0) 9468 9469 count_bug+=1; 9470 9471 } 9472 9473 9474 9475 } 9476 9477 var emailIn = $( "#voter_email" ).val(); 9478 9479 var check_email = check_email_now(emailIn); 9480 9481 9482 9483 //alert(check_email); 9484 9485 //alert(emailIn); 9486 9487 if(check_email == false) 9488 9489 { 9490 9491 $("#voter_form").find(".email").addClass("error"); 9492 9493 //$("#voter_form").find(".email").after('<span class="error_message">Required</span>'); 9494 9495 document.voter_form.voter_email.focus(); 9496 9497 count_bug+=1; 9498 9499 } 9500 9501 9502 9503 else if (document.voter_form.voter_email.value=="") 9504 9505 { 9506 9507 $("#voter_form").find(".email").addClass("error"); 9508 9509 $("#voter_form").find(".email").after('<span class="error_message">Required</span>'); 9510 9511 document.voter_form.voter_email.focus(); 9512 9513 if(eval(count_bug)==0) 9514 9515 count_bug+=1; 9516 9517 } 9518 9519 9520 9521 if (document.voter_form.voter_name.value=="") 9522 9523 { 9524 9525 $("#voter_form").find(".user").addClass("error"); 9526 9527 $("#voter_form").find(".user").after('<span class="error_message">Required</span>'); 9528 9529 document.voter_form.voter_name.focus(); 9530 9531 if(eval(count_bug)==0) 9532 9533 count_bug+=1; 9534 9535 } 9536 9537 /* 9538 9539 if(voter_form.customCheck.checked == false) 9540 9541 { 9542 9543 $("#voter_form").find(".custom-checkbox").after('<span class="error_message">Please agree with the terms of use and privacy policy.</span>'); 9544 9545 if(eval(count_bug)==0) 9546 9547 count_bug+=1; 9548 9549 } 9550 9551 else 9552 9553 { 9554 9555 $("#voter_form").find(".custom-checkbox").find(".error_message").remove(); 9556 9557 } 9558 9559 9560 9561 */ 9562 9563 //alert(count_bug); 9564 9565 if(count_bug == 0) 9566 9567 { 9568 9569 //alert('in'); 9570 9571 uname = document.voter_form.voter_name.value; 9572 9573 email = document.voter_form.voter_email.value; 9574 9575 sources = document.voter_form.voter_prof.value; 9576 9577 if((sources == 'Specialist Consultant') || (sources == 'Other')) 9578 9579 { 9580 9581 p_other = document.voter_form.voter_prof_other.value; 9582 9583 } 9584 9585 else 9586 9587 { 9588 9589 p_other = ''; 9590 9591 } 9592 9593 article_id = document.voter_form.voter_article_id.value; 9594 9595 var uri = window.location.href; 9596 9597 /* 9598 9599 if(voter_form.vote_check.checked == false) 9600 9601 { 9602 9603 vote_check = 'no'; 9604 9605 } 9606 9607 else 9608 9609 { 9610 9611 vote_check = 'yes'; 9612 9613 } 9614 9615 */ 9616 9617 vote_check = 'no'; 9618 9619 voter_current = document.voter_form.voter_current.value; 9620 9621 //alert(vote_check); 9622 9623 //alert(voter_current); 9624 9625 $.post("voter-data-next.php",{uname:uname,email:email,sources:sources,p_other:p_other,article_id:article_id,uri:uri,vote_check:vote_check,voter_current:voter_current},function(result){ 9626 9627 //alert(result); 9628 9629 var str = result.split("$$$"); 9630 9631 $("#voter_sec").html(str[0]); 9632 9633 //$("#voter_icon").html(str[1]); 9634 9635 //$("#voter_but_reg").html(str[1]); 9636 9637 //$("#voter_but_reg , #voter_icon").addClass('dark'); 9638 9639 $("#voter_close").html(str[1]); 9640 9641 $("#voter_icon").html(str[2]); 9642 9643 $("#voter_but_reg").html(str[2]); 9644 9645 //alert(str[0]); 9646 9647 //alert(str[1]); 9648 9649 //alert(str[2]); 9650 9651 $("#voter_form").find('._b').remove(); 9652 9653 $("#voter_form").find("#voter_but").show(); 9654 9655 //$("#voter_but_reg , #voter_icon").removeAttr("id"); 9656 9657 9658 9659 document.voter_form.voter_name.value = ''; 9660 9661 document.voter_form.voter_email.value = ''; 9662 9663 document.voter_form.voter_prof_other.value = ''; 9664 9665 9666 9667 //setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 9668 9669 }); 9670 9671 } 9672 9673 else 9674 9675 { 9676 9677 $("#voter_form").find('._b').remove(); 9678 9679 $("#voter_form").find("#voter_but").show(); 9680 9681 //event.stopPropagation(); 9682 9683 //event.preventDefault(); 9684 9685 //return false;
9686 9687 } 9688 9689}); 9690 9691//Voter form End 9692 9693 9694 9695 9696 9697//voter popup open start here 9698 9699//$("#voter_icon").click(function() 9700 9701 9702 9703//$('#voter_icon').on("click",function() 9704 9705 9706 9707$(document).on('click','#voter_icon,#voter_but_reg',function() 9708 9709{ 9710 9711// alert('in'); 9712 9713 uname = document.voter_form.voter_name.value; 9714 9715 email = document.voter_form.voter_email.value; 9716 9717 sources = document.voter_form.voter_prof.value; 9718 9719 if((sources == 'Specialist Consultant') || (sources == 'Other')) 9720 9721 { 9722 9723 p_other = document.voter_form.voter_prof_other.value; 9724 9725 } 9726 9727 else 9728 9729 { 9730 9731 p_other = ''; 9732 9733 } 9734 9735 article_id = document.voter_form.voter_article_id.value; 9736 9737 var uri = window.location.href; 9738 9739 temp = 1; 9740 9741 vote_now = document.voter_form.voter_now.value; 9742 9743// alert(vote_now); 9744 9745 $.post("voter-next.php",{uname:uname,email:email,sources:sources,p_other:p_other,article_id:article_id,uri:uri,temp:temp},function(result){ 9746 9747 // alert(result) 9748 9749 var str = result.split("$$$"); 9750 9751 $("#voter_current").val(str[0]); 9752 9753 //$("#voter_icon").html(str[1]); 9754 9755 //$("#voter_but_reg").html(str[1]); 9756 9757 $("#voter_but_reg , #voter_icon").addClass('dark'); 9758 9759 if(vote_now == '1') 9760 9761 { 9762 9763 $('#voter_but').click(); 9764 9765 } 9766 9767 else 9768 9769 { 9770 9771 $("#voter_popup").show(); 9772 9773 //do nothing 9774 9775 } 9776 9777 }); 9778 9779}); 9780 9781//voter popup open end here 9782 9783 9784 9785/*$('#voter_but_reg').on("click",function() 9786 9787{ 9788 9789 $('#voter_icon').click(); 9790 9791 $("#voter_now").val('1'); 9792 9793 alert(); 9794 9795 alert(); 9796 9797});*/ 9798 9799 9800 9801//Voting code end here 9802 9803 9804 9805$(document).on('click','.close_vote_now',function() 9806 9807{ 9808 9809 //alert(); 9810 9811 $(this).parents(".head_popup").fadeOut("fast"), $("body").css("overflow", "visible"); 9812 9813}); 9814 9815 9816 9817$(document).on('click','#voting-popup a, .close_vote',function() 9818 9819{ 9820 9821 //alert(); 9822 9823 //stirring_sec_web 9824 9825 //alert($('#voter_icon').hasClass('fixed')) 9826 9827 9828 9829 localStorage.setItem('votebutclick', (new Date).getDate()); 9830 9831 if($('#voter_icon').hasClass('fixed') === true) 9832 9833 { 9834 9835 //alert('1'); 9836 9837 var sc = $("#stirring_sec_web").offset().top - $("#main_header").innerHeight(); 9838 9839 } 9840 9841 else 9842 9843 { 9844 9845 //alert('2'); 9846 9847 var sc = $("#stirring_sec_web").offset().top - $("#main_header").innerHeight() - $("#main_header").innerHeight(); 9848 9849 } 9850 9851 $('html, body').animate({ 9852 9853 scrollTop: sc 9854 9855 }, 2000); 9856 9857 $(this).parents(".head_popup").fadeOut("fast"), $("body").css("overflow", "visible"); 9858 9859}); 9860 9861 9862 9863$(document).on('click','.vote_banner',function() 9864 9865{ 9866 9867 //alert(); 9868 9869 //stirring_sec_web 9870 9871 $('html, body').animate({ 9872 9873 scrollTop: $("#stirring_sec_web").offset().top - 110 9874 9875 }, 500); 9876 9877}); 9878 9879 9880 9881//Work_job load more start here 9882 9883$(document).on('click','.filter_load_more',function() 9884 9885{ 9886 9887 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 9888 9889 9890 9891 var o_id = $(this).attr('id'); 9892 9893 9894 9895 var str = o_id.split("_"); 9896 9897 9898 9899 var id = str[1]; 9900 9901 9902 9903 var pre = $("#pre").val(); 9904 9905 var loc = $("#loc").val(); 9906 9907 var med = $("#med").val(); 9908 9909 9910 9911 $('.btn.filter_load_more').remove(); 9912 9913 $('.loding').show(); 9914 9915 $.ajax({ 9916 9917 type:'POST', 9918 9919 url:'ajax_filter_result.php', 9920 9921 data:{id:id,pre:pre,loc:loc,med:med}, 9922 9923 success:function(html) 9924 9925 { 9926 9927 $('._b').remove(); 9928 9929 //alert(html); 9930 9931 $('#row').append(html); 9932 9933 } 9934 9935 }); 9936 9937}); 9938 9939//Work_job load more end here 9940 9941 9942 9943//Video load more start here 9944 9945$(document).on('click','.video_load_more',function() 9946 9947{ 9948 9949 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 9950 9951 9952 9953 var o_id = $(this).attr('id'); 9954 9955 9956 9957 var str = o_id.split("_"); 9958 9959 9960 9961 var id = str[1]; 9962 9963 9964 9965 $('.btn.video_load_more').remove(); 9966 9967 $('.loding').show(); 9968 9969 $.ajax({ 9970 9971 type:'POST', 9972 9973 url:'ajax_video-article.php', 9974 9975 data:{id:id}, 9976 9977 success:function(html) 9978 9979 { 9980 9981 $('._b').remove(); 9982 9983 //alert(html); 9984 9985 $('#row').append(html); 9986 9987 } 9988 9989 }); 9990 9991}); 9992 9993//Video load more end here 9994 9995 9996 9997 9998 9999//run ses_data start here 10000 10001/*$(window).on('load', function () { 10002 10003 setTimeout(function(){ 10004 10005 var temp = 1; 10006 10007 var url = window.location.href; 10008 10009 var pathname = window.location.pathname; 10010 10011 $.post("ses_data_with_js.php",{temp:temp,url:url,pathname:pathname},function(result){ 10012 10013 //alert("Server Returned: " + result); 10014 10015 //alert("Window Loaded"); 10016 10017 }); 10018 10019 }, 3000); 10020 10021});*/ 10022 10023//run ses_data end here 10024 10025 10026 10027 10028 10029//Comment load more start here 10030 10031$(document).on('click','#comment_loadmore',function() 10032 10033{ 10034 10035 $(this).append('<span class="loader _b"> </span>'); 10036 10037 //alert('here'); 10038 10039 $('#comment_loadmore').remove(); 10040 10041 $('._b').remove(); 10042 10043 $('#output_comment li.outer-li').removeClass('d-none'); 10044 10045 10046 10047}); 10048 10049//Comment load more end here 10050 10051 10052 10053 10054 10055//Author Read more start here
10056 10057$(document).on('click','.r_more',function() 10058 10059{ 10060 10061 //alert('out'); 10062 10063 var current_r_more = $(this).attr('id') 10064 10065 //alert(current_tab); 10066 10067 var str = current_r_more.split("-"); 10068 10069 var current_r_more_id = str[1]; 10070 10071 $(this).hide(); 10072 10073 $(this).next('.r_less').show(); 10074 10075 $("#half_auth_desc_"+current_r_more_id).find(".auth_desc_new").removeClass('authorbio'); 10076 10077 10078 10079}); 10080 10081//Author Read more end here 10082 10083//Author Read more start here 10084 10085$(document).on('click','.r_less',function() 10086 10087{ 10088 10089 //alert('in'); 10090 10091 var current_r_less = $(this).attr('id') 10092 10093 //alert(current_tab); 10094 10095 var str = current_r_less.split("-"); 10096 10097 var current_r_less_id = str[1]; 10098 10099 $(this).hide(); 10100 10101 $(this).prev('.r_more').show(); 10102 10103 $("#half_auth_desc_"+current_r_less_id).find(".auth_desc_new").addClass('authorbio'); 10104 10105 10106 10107 var scrool_pt_desc = $('.authordetails').offset().top - $('#main_header').innerHeight(); 10108 10109 $('html, body').animate({ 10110 10111 scrollTop: scrool_pt_desc 10112 10113 }, 500); 10114 10115}); 10116 10117//Author Read more end here 10118 10119 10120 10121//Gaurav Parllal-x start here 10122 10123/*$(function(){ 10124 10125 var parallax = $(".parallax-slide"); 10126 10127 $(window).scroll(function() { 10128 10129 var height = $(window).height(); 10130 10131 10132 10133 var offset = (($(".article_description p").offset().top) + height + height); 10134 10135 10136 10137 if ($(window).scrollTop() >= offset) 10138 10139 { 10140 10141 parallax.removeClass('parallax-slide').addClass("hide-h"); 10142 10143 } 10144 10145 else 10146 10147 { 10148 10149 parallax.removeClass("hide-h").addClass('parallax-slide'); 10150 10151 } 10152 10153 }); 10154 10155});*/ 10156 10157//Gaurav Parllal-x end here 10158 10159 10160 10161 10162 10163 10164 10165//sign_up news Form Start 10166 10167 10168 10169 $('#sign_up_news_but').on("click",function() 10170 10171 { 10172 10173 //alert('1'); 10174 10175 event.preventDefault(); 10176 10177 $("#sign_up_news_form").find("#sign_up_news_but").hide(); 10178 10179 $("#sign_up_news_form").append('<span class="loader _w mob_hide"> </span>'); 10180 10181 $("#sign_up_news_form").append('<span class="loader _b mob_show"> </span>'); 10182 10183 $("#sign_up_news_form").find("#email_c").removeClass("error"); 10184 10185 $("#sign_up_news_form").find("#fname_c").removeClass("error"); 10186 10187 $("#sign_up_news_form").find(".error_message").remove(); 10188 10189 //alert('2'); 10190 10191 //alert(document.sign_up_news_form.message_c.value) 10192 10193 var count_bug=0; 10194 10195 10196 10197 if(sign_up_news_form.agree_sign.checked == false) 10198 10199 { 10200 10201 $("#sign_up_news_form").find(".custom-checkbox").after('<span class="error_message">Please check the opt-in checkbox.</span>'); 10202 10203 if(eval(count_bug)==0) 10204 10205 count_bug+=1; 10206 10207 } 10208 10209 else 10210 10211 { 10212 10213 $("#sign_up_news_form").find(".custom-checkbox").find(".error_message").remove(); 10214 10215 } 10216 10217 10218 10219 if (document.sign_up_news_form.email_c.value=="") 10220 10221 { 10222 10223 $("#sign_up_news_form").find("#email_c").addClass("error"); 10224 10225 $("#sign_up_news_form").find("#email_c").append('<span class="error_message">Required</span>'); 10226 10227 document.sign_up_news_form.email_c.focus(); 10228 10229 if(eval(count_bug)==0) 10230 10231 count_bug+=1; 10232 10233 } 10234 10235 else 10236 10237 { 10238 10239 var emailIn = $( "#email_cn" ).val(); 10240 10241 //alert(emailIn); 10242 10243 10244 10245 var check_email = check_email_now(emailIn); 10246 10247 10248 10249 if(check_email == false) 10250 10251 { 10252 10253 $("#sign_up_news_form").find("#email_c").addClass("error"); 10254 10255 $("#email_c").parent().append('<span class="error_message">Invalid Email Id</span>'); 10256 10257 //$("#sign_up_news_form").find(".error_message").html('Invalid Email Id'); 10258 10259 document.sign_up_news_form.email_c.focus(); 10260 10261 count_bug+=1; 10262 10263 } 10264 10265 } 10266 10267 10268 10269 if (document.sign_up_news_form.fname_c.value=="") 10270 10271 { 10272 10273 $("#sign_up_news_form").find("#fname_c").addClass("error"); 10274 10275 $("#sign_up_news_form").find("#fname_c").append('<span class="error_message">Required</span>'); 10276 10277 document.sign_up_news_form.fname_c.focus(); 10278 10279 if(eval(count_bug)==0) 10280 10281 count_bug+=1; 10282 10283 } 10284 10285 10286 10287 if(count_bug == 0) 10288 10289 { 10290 10291 email = document.sign_up_news_form.email_c.value; 10292 10293 fname = document.sign_up_news_form.fname_c.value; 10294 10295 10296 10297 //alert(email); 10298 10299 $.post("sign_up_news-next.php",{email:email,fname:fname},function(result){ 10300 10301 //alert(result); 10302 10303 $("#sign_up_news_form").html(result); 10304 10305 //$("#sign_up_news_form").find('._w').remove(); 10306 10307 //$("#sign_up_news_form").find("#sign_up_news_but").show(); 10308 10309 10310 10311 document.sign_up_news_form.email_c.value = ''; 10312 10313 document.sign_up_news_form.fname_c.value = ''; 10314 10315 10316 10317 //setTimeout(function(){ $('.success_message').fadeOut();$('.success_message').remove(); }, 3000); 10318 10319 }); 10320 10321 } 10322 10323 else 10324 10325 { 10326 10327 //alert('a'); 10328 10329 $("#sign_up_news_form").find('._w').remove(); 10330 10331 $("#sign_up_news_form").find('._b').remove(); 10332 10333 $("#sign_up_news_form").find("#sign_up_news_but").show(); 10334 10335 event.stopPropagation(); 10336 10337 event.preventDefault(); 10338 10339 return false;
10340 10341 } 10342 10343 10344 10345 }); 10346 10347 10348 10349 //sign_up news form End 10350 10351 10352 10353 10354 10355 //Curator load more start here 10356 10357 $(document).on('click','.stirpad_load_more',function() 10358 10359 { 10360 10361 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 10362 10363 10364 10365 var o_id = $(this).attr('id'); 10366 10367 10368 10369 var str = o_id.split("_"); 10370 10371 10372 10373 var id = str[1]; 10374 10375 10376 10377 var q = $("#qs").val(); 10378 10379 10380 10381 $('.btn.stirpad_load_more').remove(); 10382 10383 $('.loding').show(); 10384 10385 $.ajax({ 10386 10387 type:'POST', 10388 10389 url:'ajax_stirpad_result.php', 10390 10391 data:{id:id,q:q}, 10392 10393 success:function(html) 10394 10395 { 10396 10397 $('.loadmore_btn').remove(); 10398 10399 //alert(html); 10400 10401 $('#news-data').append(html); 10402 10403 } 10404 10405 }); 10406 10407 }); 10408 10409 //Curator load more end here 10410 10411 10412 10413 //Search load more start here 10414 10415 $(document).on('click','.search_load_more',function() 10416 10417 { 10418 10419 $(this).parent(".loadmore_btn").append('<span class="loader _b"> </span>'); 10420 10421 10422 10423 var o_id = $(this).attr('id'); 10424 10425 10426 10427 var str = o_id.split("_"); 10428 10429 10430 10431 var id = str[1]; 10432 10433 10434 10435 var q = $("#q").val(); 10436 10437 var q2 = $("#q2").val(); 10438 10439 var s_b = $("#rel_cho option:selected").attr('value'); 10440 10441 //var s_m = $("#med_cho option:selected").attr('value'); 10442 10443 var s_m = ''; 10444 10445 //alert(s_b) 10446 10447 $('.btn.search_load_more').remove(); 10448 10449 $('.loding').show(); 10450 10451 $.ajax({ 10452 10453 type:'POST', 10454 10455 url:'ajax_search_result.php', 10456 10457 data:{id:id,q:q,q2:q2,s_b:s_b,s_m:s_m}, 10458 10459 success:function(html) 10460 10461 { 10462 10463 $('._b,.rm_sec').remove(); 10464 10465 //alert(html); 10466 10467 $('#search_row').append(html); 10468 10469 } 10470 10471 }); 10472 10473 }); 10474 10475 //Search load more end here 10476 10477 10478 10479 //tag Search load more start here 10480 10481 $(document).on('click','.tag_search_load_more',function() 10482 10483 { 10484 10485 //$(this).html('<span class="loader _b"> </span>'); 10486 10487 $(this).parent(".loadmore_btn").append('<span class="loader _b"> </span>'); 10488 10489 10490 10491 var o_id = $(this).attr('id'); 10492 10493 10494 10495 var str = o_id.split("_"); 10496 10497 10498 10499 var id = str[1]; 10500 10501 10502 10503 var q = $("#q").val(); 10504 10505 var q2 = $("#q2").val(); 10506 10507 10508 10509 $('.btn.tag_search_load_more').remove(); 10510 10511 $('.loding').show(); 10512 10513 $.ajax({ 10514 10515 type:'POST', 10516 10517 url:'ajax_search_tag_result.php', 10518 10519 data:{id:id,q:q,q2:q2}, 10520 10521 success:function(html) 10522 10523 { 10524 10525 $('.b,.rm_tag_sec').remove(); 10526 10527 10528 10529 var str_data = html.split("$$$"); 10530 10531 10532 10533 //alert(html); 10534 10535 $('#tag_search_row').append(str_data[0]); 10536 10537 $('#tag_search_row').after(str_data[1]); 10538 10539 } 10540 10541 }); 10542 10543 }); 10544 10545 //Search load more end here 10546 10547 10548 10549 10550 10551 //relevance data on search start here 10552 10553 $(document).on('change','#rel_cho',function() 10554 10555 { 10556 10557 $('#rel_cho_chzn').find('.active-result').removeClass('result-selected'); 10558 10559 var c_mt = $('#rel_cho option:selected').attr('class'); 10560 10561 $('#rel_cho_chzn').find('#rel_cho_chzn_'+c_mt).addClass('result-selected'); 10562 10563 10564 10565 var id = 1; 10566 10567 10568 10569 var q = $("#q").val(); 10570 10571 var q2 = $("#q2").val(); 10572 10573 var s_b = $("#rel_cho option:selected").attr('value'); 10574 10575 //var s_m = $("#med_cho option:selected").attr('value'); 10576 10577 var s_m = ''; 10578 10579 10580 10581 $("#search_row").html('<span class="loader _b"> </span>'); 10582 10583 $.ajax({ 10584 10585 type:'POST', 10586 10587 url:'ajax_search_result.php', 10588 10589 data:{id:id,q:q,q2:q2,s_b:s_b,s_m:s_m}, 10590 10591 success:function(html) 10592 10593 { 10594 10595 $('._b,.rm_sec').remove(); 10596 10597 //alert(html); 10598 10599 $('#search_row').html(html); 10600 10601 } 10602 10603 }); 10604 10605 10606 10607 }); 10608 10609 //relevance data on search end here 10610 10611 10612 10613 10614 10615 //Medium data on search start here 10616 10617 $(document).on('change','#med_cho',function() 10618 10619 { 10620 10621 $('#med_cho_chzn').find('.active-result').removeClass('result-selected'); 10622 10623 var c_mt = $('#med_cho option:selected').attr('class'); 10624 10625 $('#med_cho_chzn').find('#med_cho_chzn_'+c_mt).addClass('result-selected'); 10626 10627 var id = 1; 10628 10629 10630 10631 var q = $("#q").val(); 10632 10633 var q2 = $("#q2").val(); 10634 10635 var s_b = $("#rel_cho option:selected").attr('value'); 10636 10637 //var s_m = $("#med_cho option:selected").attr('value'); 10638 10639 var s_m = ''; 10640 10641 10642 10643 if(s_m == '') 10644 10645 { 10646 10647 10648 10649 $('#med_cho_chzn').find('.chzn-single').find('span').html('Medium'); 10650 10651 } 10652 10653 10654 10655 $("#search_row").html('<span class="loader _b"> </span>'); 10656 10657 $.ajax({ 10658 10659 type:'POST', 10660 10661 url:'ajax_search_result.php', 10662 10663 data:{id:id,q:q,q2:q2,s_b:s_b,s_m:s_m}, 10664 10665 success:function(html) 10666 10667 { 10668 10669 $('._b,.rm_sec').remove(); 10670 10671 //alert(html); 10672 10673 $('#search_row').html(html); 10674 10675 } 10676 10677 }); 10678 10679 10680 10681 }); 10682 10683 //Medium data on search end here 10684 10685 10686 10687 //listing data on search start here 10688 10689 $(document).on('change','#lis_cho',function() 10690 10691 { 10692 10693 $('#lis_cho_chzn').find('.active-result').removeClass('result-selected'); 10694 10695 var c_mt = $('#lis_cho option:selected').attr('class'); 10696 10697 $('#lis_cho_chzn').find('#lis_cho_chzn_'+c_mt).addClass('result-selected'); 10698 10699 10700 10701 var q = $("#q").val(); 10702 10703 var q2 = $("#q2").val(); 10704 10705 var lis = $("#lis_cho").val(); 10706 10707 var status = $("#sta_cho").val(); 10708 10709 var temp = 1; 10710 10711 if(lis == '') 10712 10713 { 10714 10715 10716 10717 $('#lis_cho_chzn').find('.chzn-single').find('span').html('Event Type'); 10718 10719 } 10720 10721 10722 10723 $("#listing_search").html('<span class="loader _b"> </span>'); 10724 10725 $.ajax({ 10726 10727 type:'POST', 10728 10729 url:'ajax_listings_search.php', 10730 10731 data:{q:q,q2:q2,lis:lis,status:status,temp:temp}, 10732 10733 success:function(html) 10734 10735 { 10736 10737 $('._b').remove(); 10738 10739 //alert(html); 10740 10741 $('#listing_search').html(html); 10742 10743 } 10744 10745 }); 10746 10747 10748 10749 }); 10750 10751 //listing data on search end here 10752 10753 10754 10755 //status data on search start here
10756 10757 $(document).on('change','#sta_cho',function() 10758 10759 { 10760 10761 $('#sta_cho_chzn').find('.active-result').removeClass('result-selected'); 10762 10763 var c_mt = $('#sta_cho option:selected').attr('class'); 10764 10765 $('#sta_cho_chzn').find('#sta_cho_chzn_'+c_mt).addClass('result-selected'); 10766 10767 10768 10769 var q = $("#q").val(); 10770 10771 var q2 = $("#q2").val(); 10772 10773 var lis = $("#lis_cho").val(); 10774 10775 var status = $("#sta_cho").val(); 10776 10777 var temp = 1; 10778 10779 if(status == '') 10780 10781 { 10782 10783 10784 10785 $('#sta_cho_chzn').find('.chzn-single').find('span').html('Status'); 10786 10787 } 10788 10789 10790 10791 $("#listing_search").html('<span class="loader _b"> </span>'); 10792 10793 $.ajax({ 10794 10795 type:'POST', 10796 10797 url:'ajax_listings_search.php', 10798 10799 data:{q:q,q2:q2,lis:lis,status:status,temp:temp}, 10800 10801 success:function(html) 10802 10803 { 10804 10805 $('._b').remove(); 10806 10807 //alert(html); 10808 10809 $('#listing_search').html(html); 10810 10811 } 10812 10813 }); 10814 10815 10816 10817 }); 10818 10819 //status data on search end here 10820 10821 10822 10823 //clear data on search start here 10824 10825 $(document).on('click','#cle_cho',function() 10826 10827 { 10828 10829 10830 10831 var q = $("#q").val(); 10832 10833 var q2 = $("#q2").val(); 10834 10835 var lis = ''; 10836 10837 var status = ''; 10838 10839 var temp = 1; 10840 10841 $('#lis_cho').val('').trigger('liszt:updated'); 10842 10843 $('#sta_cho').val('').trigger('liszt:updated'); 10844 10845 10846 10847 $('#lis_cho_chzn').find('.chzn-single').find('span').html('All Events'); 10848 10849 $('#sta_cho_chzn').find('.chzn-single').find('span').html('Status'); 10850 10851 10852 10853 $("#listing_search").html('<span class="loader _b"> </span>'); 10854 10855 $.ajax({ 10856 10857 type:'POST', 10858 10859 url:'ajax_listings_search.php', 10860 10861 data:{q:q,q2:q2,lis:lis,status:status,temp:temp}, 10862 10863 success:function(html) 10864 10865 { 10866 10867 $('._b').remove(); 10868 10869 //alert(html); 10870 10871 $('#listing_search').html(html); 10872 10873 } 10874 10875 }); 10876 10877 10878 10879 }); 10880 10881 //clear data on search end here 10882 10883 10884 10885 //load more listing data on search start here
10886 10887 $(document).on('click','.lis_search_load_more',function() 10888 10889 { 10890 10891 $(this).parent(".loadmore_btn").append('<span class="loader _b"> </span>'); 10892 10893 10894 10895 var o_id = $(this).attr('id'); 10896 10897 10898 10899 var str = o_id.split("_"); 10900 10901 10902 10903 var id = str[1]; 10904 10905 10906 10907 var q = $("#q").val(); 10908 10909 var q2 = $("#q2").val(); 10910 10911 var lis = ''; 10912 10913 var status = ''; 10914 10915 var temp = 2; 10916 10917 $('#lis_cho').val('').trigger('liszt:updated'); 10918 10919 $('#sta_cho').val('').trigger('liszt:updated'); 10920 10921 10922 10923 $('.btn.lis_search_load_more').remove(); 10924 10925 $('.loding').show(); 10926 10927 $.ajax({ 10928 10929 type:'POST', 10930 10931 url:'ajax_listings_search.php', 10932 10933 data:{q:q,q2:q2,lis:lis,status:status,temp:temp,id:id}, 10934 10935 success:function(html) 10936 10937 { 10938 10939 $('._b,.lis_rm_sec').remove(); 10940 10941 //alert(html); 10942 10943 $('#listing_search').append(html); 10944 10945 } 10946 10947 }); 10948 10949 10950 10951 }); 10952 10953 //load more listing data on search end here 10954 10955 10956 10957//STIR fri Email checker start here 10958 10959$(document).on('click','#fri_btn',function() 10960 10961{ 10962 10963 event.preventDefault(); 10964 10965 //$("#fri_email").css("border", ''); 10966 10967 $("#fri_email").parent().removeClass('error'); 10968 10969 $("#fri_email").parent().next('.error_message').remove(); 10970 10971 var cur_btn = $(this); 10972 10973 cur_btn.hide(); 10974 10975 cur_btn.after('<span class="loader _b m-auto"> </span>'); 10976 10977 10978 10979 var count_bug = 0; 10980 10981 var email_c = 0; 10982 10983 var temp = 1; 10984 10985 var email = $("#fri_email").val(); 10986 10987 var check_email = check_email_now(email); 10988 10989 10990 10991 if(email == '') 10992 10993 { 10994 10995 count_bug+=1; 10996 10997 email_c = 0; 10998 10999 } 11000 11001 else 11002 11003 { 11004 11005 email_c+=1; 11006 11007 11008 11009 if(check_email == false) 11010 11011 { 11012 11013 count_bug+=1; 11014 11015 } 11016 11017 } 11018 11019 if(count_bug == 0) 11020 11021 { 11022 11023 var uri = window.location.href; 11024 11025 var c_url = encodeURI(uri); 11026 11027 $.ajax({ 11028 11029 type:'POST', 11030 11031 url:'stirfri_checker.php', 11032 11033 data:{temp:temp,email:email,c_url:c_url}, 11034 11035 success:function(html) 11036 11037 { 11038 11039 $('.loader').remove(); 11040 11041 $('.stirfri_sub_form').html(html); 11042 11043 } 11044 11045 }); 11046 11047 } 11048 11049 else 11050 11051 { 11052 11053 $('.loader').remove(); 11054 11055 cur_btn.show(); 11056 11057 $("#fri_email").focus(); 11058 11059 //$("#fri_email").parent("border", '1px solid #C50F16'); 11060 11061 $("#fri_email").parent().addClass('error'); 11062 11063 if(email_c == 0) 11064 11065 { 11066 11067 $("#fri_email").parent().after('<span class="error_message">Required</span>'); 11068 11069 } 11070 11071 else 11072 11073 { 11074 11075 $("#fri_email").parent().after('<span class="error_message">Invalid Email Id</span>'); 11076 11077 } 11078 11079 } 11080 11081}); 11082 11083//STIR fri Email checker end here 11084 11085 11086 11087 11088 11089//Check Code start here 11090 11091$(document).on('click','#vc_verify_but',function() 11092 11093{ 11094 11095 event.preventDefault(); 11096 11097 $("#vc_verify_form").find("#vc_verify_but").hide(); 11098 11099 $("#vc_verify_form").append('<span class="loader _b mt-0 float-left"> </span>'); 11100 11101 $("#vc_error").html(''); 11102 11103 11104 11105 var count_bug=0; 11106 11107 11108 11109 /*var vc_code = []; 11110 11111 $('.otp-inputbar').each(function () { 11112 11113 vc_code.push($(this).val()); 11114 11115 }); 11116 11117 11118 11119 vc_code = vc_code.join('');*/ 11120 11121 11122 11123 var vc_code = $('#verify_text').val(); 11124 11125 if (vc_code == "") 11126 11127 { 11128 11129 $("#vc_error").html('Code can't be empty'); 11130 11131 if(eval(count_bug)==0) 11132 11133 count_bug+=1; 11134 11135 } 11136 11137 if(vc_code.length < 6) 11138 11139 { 11140 11141 /* var a = 0; 11142 11143 $('.otp-inputbar').each(function () { 11144 11145 if($(this).val() == '') 11146 11147 { 11148 11149 $(this).css("border", '1px solid #C50F16'); 11150 11151 if(a == 0) 11152 11153 { 11154 11155 $(this).focus(); 11156 11157 a++; 11158 11159 } 11160 11161 } 11162 11163 else 11164 11165 { 11166 11167 $(this).css("border", ''); 11168 11169 } 11170 11171 });*/ 11172 11173 11174 11175 $('#verify_text').css("border", '1px solid #C50F16'); 11176 11177 if(eval(count_bug)==0) 11178 11179 count_bug+=1; 11180 11181 } 11182 11183 else 11184 11185 { 11186 11187 //$('.otp-inputbar').css("border", ''); 11188 11189 $('#verify_text').css("border", ''); 11190 11191 } 11192 11193 11194 11195 if(count_bug == 0) 11196 11197 { 11198 11199 var vc_email = $('#vc_email').val(); 11200 11201 var vc_check = $('#vc_check').val(); 11202 11203 11204 11205 //alert(email); 11206 11207 $.post("code-next.php",{vc_code:vc_code,vc_email:vc_email,vc_check:vc_check},function(result){ 11208 11209 //alert(result); 11210 11211 $("#vc_verify_form").find("#vc_verify_but").show(); 11212 11213 $("._b").remove(); 11214 11215 $("#vc_error").html(result); 11216 11217 11218 11219 }); 11220 11221 } 11222 11223 else 11224 11225 { 11226 11227 $("#vc_verify_form").find("#vc_verify_but").show(); 11228 11229 $("._b").remove(); 11230 11231 event.stopPropagation(); 11232 11233 event.preventDefault(); 11234 11235 return false;
11236 11237 } 11238 11239 11240 11241 11242 11243}); 11244 11245//Check Code End here 11246 11247 11248 11249var count_res_code = 0; 11250 11251//Resend Code start here 11252 11253$(document).on('click','#res_code',function() 11254 11255{ 11256 11257 event.preventDefault(); 11258 11259 //alert(count_res_code); 11260 11261 count_res_code += 1; 11262 11263 $("#vc_error").html(''); 11264 11265 11266 11267 $('#res_code').attr("style", "display: none !important"); 11268 11269 11270 11271 if (count_res_code == 3) 11272 11273 { 11274 11275 // come code 11276 11277 $("#res_code").remove(); 11278 11279 $("#vc_error").html('Maximum Limit reach'); 11280 11281 setTimeout(function(){ $("#vc_error").html(''); }, 5000); 11282 11283 } 11284 11285 else 11286 11287 { 11288 11289 var count_bug = 0; 11290 11291 if(count_bug == 0) 11292 11293 { 11294 11295 var vc_email = $('#vc_email').val(); 11296 11297 //alert(vc_email); 11298 11299 $.post("resend-code-next.php",{vc_email:vc_email},function(result){ 11300 11301 //alert(result); 11302 11303 $("#vc_error").html(result); 11304 11305 setTimeout(function(){$("#vc_error").html(''); }, 5000); 11306 11307 setTimeout(function(){$("#res_code").show(); }, 30000); 11308 11309 11310 11311 11312 11313 }); 11314 11315 } 11316 11317 else 11318 11319 { 11320 11321 $("#res_code").show(); 11322 11323 event.stopPropagation(); 11324 11325 event.preventDefault(); 11326 11327 return false; 11328 11329 } 11330 11331 } 11332 11333 11334 11335 11336 11337}); 11338 11339//Resend Code End here 11340 11341 11342 11343//Subscribe STIRfri start here
11344 11345$(document).on('click','#subs_btn',function() 11346 11347{ 11348 11349 event.preventDefault(); 11350 11351 $(this).hide(); 11352 11353 $(this).parent('.form-group').append('<span class="loader _b mt-0 float-left"> </span>'); 11354 11355 11356 11357 var count_bug=0; 11358 11359 11360 11361 if(count_bug == 0) 11362 11363 { 11364 11365 var subs_email = $('#subs_email').val(); 11366 11367 11368 11369 //alert(email); 11370 11371 $.post("subs_fri-next.php",{subs_email:subs_email},function(result){ 11372 11373 //alert(result); 11374 11375 $('#subscribe_popup').fadeOut('fast'); 11376 11377 $("#subs_btn").show(); 11378 11379 $("._b").remove(); 11380 11381 $('#stirfri_preferences_popup').fadeIn('slow'); 11382 11383 11384 11385 }); 11386 11387 } 11388 11389 else 11390 11391 { 11392 11393 $("#subs_btn").show(); 11394 11395 $("._b").remove(); 11396 11397 event.stopPropagation(); 11398 11399 event.preventDefault(); 11400 11401 return false; 11402 11403 } 11404 11405 11406 11407 11408 11409}); 11410 11411//Subscribe STIRfri end here 11412 11413 11414 11415//Check Code start here 11416 11417$(document).on('click','#stirfri_preferences_btn',function() 11418 11419{ 11420 11421 //alert(); 11422 11423 event.preventDefault(); 11424 11425 $("#stirfri_preferences_btn").hide(); 11426 11427 $("#stirfri_preferences_btn").parent('.form-group').append('<span class="loader _b mt-0 float-left"> </span>'); 11428 11429 $(".error_msg").html(''); 11430 11431 11432 11433 var count_bug=0; 11434 11435 11436 11437 var preference_s = multiple_values('sf_sub_pref'); 11438 11439 if(preference_s == '') 11440 11441 { 11442 11443 $("#sf_sub_signup_form").find(".prefrences_checkbox").append('<span class="mb-0 error_message error_msg">Required</span>'); 11444 11445 count_bug+=1; 11446 11447 } 11448 11449 //alert(preference_s); 11450 11451 if(count_bug == 0) 11452 11453 { 11454 11455 var pathname = window.location.href; 11456 11457 var email = $('#sf_sub_email').val(); 11458 11459 $.post("stirfri_preference-next.php",{preference_s:preference_s,pathname:pathname,email:email},function(result){ 11460 11461 //alert(result+' here'); 11462 11463 var str = result.split("$$$"); 11464 11465 if(str[1] == 1) 11466 11467 { 11468 11469 $('#sf_sub_area').html(str[0]); 11470 11471 } 11472 11473 else 11474 11475 { 11476 11477 $('#sf_sub_signup_form_area').html(str[0]); 11478 11479 $("._b").remove(); 11480 11481 $('#sf_sub_signup_form').parent('.stirfri_right_column').addClass('sf_exclusive_column'); 11482
11483 $('#sf_continue_btn').text('continue reading').attr('href','javascript:window.location.reload(true)'); 11484 11485 $('.stirfri_subscribe_popup').find('.closebut').attr('onClick','javascript:window.location.reload(true)'); 11486 11487 } 11488 11489 }); 11490 11491 } 11492 11493 else 11494 11495 { 11496 11497 $("#stirfri_preferences_btn").show(); 11498 11499 $("._b").remove(); 11500 11501 event.stopPropagation(); 11502 11503 event.preventDefault(); 11504 11505 return false; 11506 11507 } 11508 11509 11510 11511 11512 11513}); 11514 11515//Check Code End here 11516 11517 11518 11519 11520 11521$(document).on('click','#stirfri_check',function() 11522 11523{ 11524 11525 if($(this).is(":checked")) 11526 11527 { 11528 11529 $(".prefrences_checkbox").show(); 11530 11531 $("#signup_popup").find('.col_spc').addClass('pb-0'); 11532 11533 } 11534 11535 else 11536 11537 { 11538 11539 $(".prefrences_checkbox").hide(); 11540 11541 $("#signup_popup").find('.col_spc').removeClass('pb-0'); 11542 11543 } 11544 11545}); 11546 11547 11548 11549 11550 11551$(document).on('click','#os_stirfri_check',function() 11552 11553{ 11554 11555 if($(this).is(":checked")) 11556 11557 { 11558 11559 $(".os_prefrences_checkbox").show(); 11560 11561 } 11562 11563 else 11564 11565 { 11566 11567 $(".os_prefrences_checkbox").hide(); 11568 11569 } 11570 11571}); 11572 11573 11574 11575 11576 11577//STIRfri Sign Up Form Start 11578 11579 11580 11581 $(document).on('click','#sf_sub_signup_but',function() 11582 11583 { 11584 11585 $("#sf_sub_signup_form").find("#sf_sub_signup_span").hide(); 11586 11587 $("#sf_sub_signup_form").append('<span class="loader _b"> </span>'); 11588 11589 $("#sf_sub_signup_form").find(".error_message").remove(); 11590 11591 $("#sf_sub_signup_form").find(".password").removeClass("error"); 11592 11593 $("#sf_sub_signup_form").find(".user").removeClass("error"); 11594 11595 11596 11597 var count_bug=0; 11598 11599 11600 11601 var pswd = $('#sf_sub_pass').val(); 11602 11603 //var regularExpression = /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]/; 11604 11605 var regularExpression = "^(?=.*[A-Z])(?=.*\\d)(?=.*[-+_!@#$%^&*.,?]).+$"; 11606 11607 11608 11609 if (pswd == "") 11610 11611 { 11612 11613 $("#sf_sub_signup_form").find(".password").addClass("error"); 11614 11615 //$("#sf_sub_signup_form").find(".password").after('<span class="error_message">Your new password must be at least 8 chararacters long</span>'); 11616 11617 $("#sf_sub_signup_form").find(".password").after('<span class="error_message">Required</span>'); 11618 11619 document.sf_sub_signup_form.sf_sub_pass.focus(); 11620 11621 if(eval(count_bug)==0) 11622 11623 count_bug+=1; 11624 11625 } 11626 11627 else if(pswd.length <= 7) 11628 11629 { 11630 11631 $("#sf_sub_signup_form").find(".password").addClass("error"); 11632 11633 $("#sf_sub_signup_form").find(".password").after('<span class="error_message">Minimum 8 characters required for password.</span>'); 11634 11635 //$("#sf_sub_signup_form").find(".password").after('<span class="error_message">Required</span>'); 11636 11637 document.sf_sub_signup_form.sf_sub_pass.focus(); 11638 11639 if(eval(count_bug)==0) 11640 11641 count_bug+=1; 11642 11643 } 11644 11645 else if(!(pswd.match(regularExpression))) 11646 11647 { 11648 11649 $("#sf_sub_signup_form").find(".password").addClass("error"); 11650 11651 $("#sf_sub_signup_form").find(".password").after('<span class="error_message">Password must be contains one capital letter, one digit and one special character.</span>'); 11652 11653 //$("#sf_sub_signup_form").find(".password").after('<span class="error_message">Required</span>'); 11654 11655 document.sf_sub_signup_form.sf_sub_pass.focus(); 11656 11657 if(eval(count_bug)==0) 11658 11659 count_bug+=1; 11660 11661 } 11662 11663 11664 11665 if (document.sf_sub_signup_form.sf_sub_name.value=="") 11666 11667 { 11668 11669 $("#sf_sub_signup_form").find(".user").addClass("error"); 11670 11671 $("#sf_sub_signup_form").find(".user").append('<span class="error_message">Required</span>'); 11672 11673 document.sf_sub_signup_form.sf_sub_name.focus(); 11674 11675 if(eval(count_bug)==0) 11676 11677 count_bug+=1; 11678 11679 } 11680 11681 else 11682 11683 { 11684 11685 var c_sf_sub_name = $( "input[name=sf_sub_name]" ).val(); 11686 11687 var check_c_sf_sub_name = validURL(c_sf_sub_name); 11688 11689 //alert(check_c_sf_sub_name); 11690 11691 if(check_c_sf_sub_name == false) 11692 11693 { 11694 11695 //do nothing 11696 11697 } 11698 11699 else 11700 11701 { 11702 11703 $("#sf_sub_signup_form").find(".user").addClass("error"); 11704 11705 document.sf_sub_signup_form.sf_sub_name.focus(); 11706 11707 if(eval(count_bug)==0) 11708 11709 count_bug+=1; 11710 11711 } 11712 11713 } 11714 11715 11716 11717 /*if(sf_sub_signup_form.sf_sub_customCheck.checked == false) 11718 11719 { 11720 11721 //$("#sf_sub_signup_form").find("#sf_sub_customCheck").parent(".custom-checkbox").after('<span class="error_message">Please agree with the terms of use and privacy policy.</span>'); 11722 11723 $("#sf_sub_signup_form").find("#sf_sub_customCheck").parent(".custom-checkbox").after('<span class="error_message">Required</span>'); 11724 11725 if(eval(count_bug)==0) 11726 11727 count_bug+=1; 11728 11729 } 11730 11731 else 11732 11733 { 11734 11735 $("#sf_sub_signup_form").find("#sf_sub_customCheck").parent(".custom-checkbox").find(".error_message").remove(); 11736 11737 }*/ 11738 11739 11740 11741 var sf_pref = multiple_values('sf_sub_pref'); 11742 11743 if(sf_pref == '') 11744 11745 { 11746 11747 //$("#sf_sub_signup_form").find(".prefrences_checkbox").append('<span class="mb-0 error_message error_msg">Please select atleast one to proceed.</span>'); 11748 11749 $("#sf_sub_signup_form").find(".prefrences_checkbox").append('<span class="mb-0 error_message error_msg">Required</span>'); 11750 11751 if(eval(count_bug)==0) 11752 11753 count_bug+=1; 11754 11755 } 11756 11757 11758 11759 11760 11761 if(count_bug == 0) 11762 11763 { 11764 11765 //alert('in'); 11766 11767 11768 11769 localStorage.setItem('prof_popup_appear', (new Date).getDate()); //Same day Profession popup not appear 11770 11771 $('#sf_sub_signup_form').attr('action','register-next-sf.php'); 11772 11773 document.getElementById('sf_sub_signup_form').submit(); 11774 11775 } 11776 11777 else 11778 11779 { 11780 11781 $("#sf_sub_signup_form").find('._b').remove(); 11782 11783 $("#sf_sub_signup_form").find("#sf_sub_signup_span").show(); 11784 11785 event.stopPropagation(); 11786 11787 event.preventDefault(); 11788 11789 return false;
11790 11791 } 11792 11793 }); 11794 11795 11796 11797 //Sign Up form End 11798 11799 11800 11801 //Change Subscription settings Start 11802 11803 $(document).on('click','#pro_o_settings',function() 11804 11805 { 11806 11807 var count_bug=0; 11808 11809 11810 11811 var p_subscriber = $('#p_subscriber').prop('checked'); 11812 11813 var os_stirfri_check = $('#os_stirfri_check').prop('checked'); 11814 11815 $(".error_message").remove(); 11816 11817 //alert(os_stirfri_check); 11818 11819 if(os_stirfri_check == true) 11820 11821 { 11822 11823 var os_sf_pref = multiple_values('os_sf_pref'); 11824 11825 if(os_sf_pref == '') 11826 11827 { 11828 11829 $(".os_prefrences_checkbox").append("<span class='error_message'>Required</span>"); 11830 11831 count_bug+=1; 11832 11833 } 11834 11835 } 11836 11837 else 11838 11839 { 11840 11841 os_sf_pref = '' 11842 11843 } 11844 11845 11846 11847 if(count_bug == 0) 11848 11849 { 11850 11851 //alert(email); 11852 11853 $.post("subscription-next.php",{p_subscriber:p_subscriber,os_stirfri_check:os_stirfri_check,os_sf_pref:os_sf_pref},function(result){ 11854 11855 //alert(result); 11856 11857 if(result == 1) 11858 11859 { 11860 11861 $("#o_settings_form").append("<span id = 'update' style='color: rgba(228,99,143,.9);'>Settings successfully updated.</span>"); 11862 11863 setTimeout(function(){ $('#update').fadeOut();$('#update').remove(); }, 3000); 11864 11865 window.location.reload(); 11866 11867 } 11868 11869 11870 11871 }); 11872 11873 } 11874 11875 else 11876 11877 { 11878 11879 event.stopPropagation(); 11880 11881 event.preventDefault(); 11882 11883 return false; 11884 11885 } 11886 11887 11888 11889 }); 11890 11891 11892 11893 //Change Subscription settings End 11894 11895 11896 11897 11898 11899 11900 11901 11902 11903 11904// Password to Text and vice versa Start 11905 11906$(document).on('click','.eye_icon',function(){ 11907 11908 var input = $(this).prev('input'); 11909 11910 //input.focus(); 11911 11912 if (input.attr("type") == "password") 11913 11914 { 11915 11916 input.attr("type", "text"); 11917 11918 $(this).removeClass('hide').addClass('show'); 11919 11920 11921 11922 } 11923 11924 else 11925 11926 { 11927 11928 input.attr("type", "password"); 11929 11930 $(this).removeClass('show').addClass('hide'); 11931 11932 } 11933 11934}); 11935 11936// Password to Text and vice versa End 11937 11938 11939 11940 11941 11942//Filter data start here 11943 11944$(document).on('click', '.filtersbut', function() 11945 11946{ 11947 11948 $("#filter_area_data").html('<span class="loader _b m-auto"> </span>'); 11949 11950 var count_bug = 0; 11951 11952 if (count_bug == 0) 11953 11954 { 11955 11956 var check = 1 11957 11958 $.post("filter_pop_up-data.php", {check: check}, function(result) { 11959 11960 //alert(result); 11961 11962 if (result == 1) 11963 11964 { 11965 11966 window.location.reload(); 11967 11968 } 11969 11970 else 11971 11972 { 11973 11974 $("#filter_area_data").html(result); 11975 11976 } 11977 11978 }); 11979 11980 } 11981 11982 else 11983 11984 { 11985 11986 event.stopPropagation(); 11987 11988 event.preventDefault(); 11989 11990 return false; 11991 11992 } 11993 11994}); 11995 11996//Filter data End here 11997 11998 11999 12000 12001 12002//Search data start here 12003 12004$(document).on('click', '.searchbut,#project_s', function() 12005 12006{ 12007 12008 $(".tags_search").find(".article_tag_tab").html('<span class="loader _b m-auto"> </span>'); 12009 12010 var count_bug = 0; 12011 12012 if (count_bug == 0) 12013 12014 { 12015 12016 var check = 1 12017 12018 $.post("search_pop_up-data.php", {check: check}, function(result) { 12019 12020 //alert(result); 12021 12022 if (result == 1) 12023 12024 { 12025 12026 window.location.reload(); 12027 12028 } 12029 12030 else 12031 12032 { 12033 12034 $(".tags_search").find(".article_tag_tab").html(result); 12035 12036 } 12037 12038 }); 12039 12040 } 12041 12042 else 12043 12044 { 12045 12046 event.stopPropagation(); 12047 12048 event.preventDefault(); 12049 12050 return false; 12051 12052 } 12053 12054}); 12055 12056//Search data End here 12057 12058//SP Tag load more start here 12059 12060 $(document).on('click','.sp_tag_load_more',function() 12061 12062 { 12063 12064 $(".loadmore_btn").append('<span class="loader _b"> </span>'); 12065 12066 12067 12068 var o_id = $(this).attr('id'); 12069 12070 12071 12072 var str = o_id.split("_"); 12073 12074 12075 12076 var id = str[1]; 12077 12078 12079 12080 var q = $("#q").val(); 12081 12082 12083 12084 $('.btn.sp_tag_load_more').hide(); 12085 12086 $('.loding').show(); 12087 12088 $.ajax({ 12089 12090 type:'POST', 12091 12092 url:'ajax_tag_result_sp.php', 12093 12094 data:{id:id,q:q}, 12095 12096 success:function(html) 12097 12098 { 12099 12100 $('.loadmore_btn').remove(); 12101 12102 //alert(html); 12103 12104 $('#news-data').append(html); 12105 12106 } 12107 12108 }); 12109 12110 }); 12111 12112 //SP Tag load more end here 12113 12114/*STIRfri footer text change start here*/ 12115 12116$(document).on('click','.stirfri_accordion_head',function(){ 12117 12118 if($('.stirfri_accordion_body').hasClass('stirfri_show')) 12119 12120 { 12121 12122 $(".stirfri_accordion_body").addClass("stirfri_hide").removeClass("stirfri_show"); 12123 $(this).removeClass("ro_icon"); 12124 12125 /*$('.before_collapse').css('opacity','0'); 12126 12127 $('.after_collapse').css('opacity','1');*/ 12128 12129 $('.before_collapse').addClass('hide_bc'); 12130 12131 $('.after_collapse').addClass('show_ac'); 12132 12133 localStorage.setItem('stirfri_accordion_head_collapsed', 'stirfri_hide'); 12134 12135 localStorage.setItem('stirfri_accordion_body_show', ''); 12136 12137 } 12138 12139 else 12140 12141 { 12142 12143 $(this).addClass("ro_icon"); 12144 $(".stirfri_accordion_body").addClass("stirfri_show").removeClass("stirfri_hide"); 12145 12146 /*$('.after_collapse').css('opacity','0'); 12147 12148 $('.before_collapse').css('opacity','1');*/ 12149 12150 $('.before_collapse').removeClass('hide_bc'); 12151 12152 $('.after_collapse').removeClass('show_ac'); 12153 12154 localStorage.setItem('stirfri_accordion_head_collapsed', ''); 12155 12156 localStorage.setItem('stirfri_accordion_body_show', 'stirfri_show'); 12157 12158 } 12159 12160}); 12161 12162/*STIRfri footer text change end here*/ 12163 12164 12165 12166/* Check Stirfri Collapse condition start here*/ 12167 12168if ((localStorage.getItem('stirfri_accordion_head_collapsed') == 'stirfri_hide') && (localStorage.getItem('stirfri_accordion_body_show') == '')) 12169 12170{ 12171 12172 $('.stirfri_accordion_head').click(); 12173 12174} 12175 12176 12177 12178/* Check Stirfri Collapse condition end here*/
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.