1;(function($){ 2 function extp_masonry(){ 3 if (typeof imagesLoaded === "function" && $('.extp-masonry:not(.column-1) .ctgrid').length){ 4 var $container = $('.extp-masonry:not(.column-1) .ctgrid'); 5 $container.imagesLoaded( function() { 6 $container.masonry({ 7 itemSelector: '.item-grid', 8 horizontalOrder: true 9 }); 10 }); 11 } 12 } 13 $(document).ready(function() { 14 extp_masonry(); 15 function extp_lightbox(){ 16 $('.exlightbox').each(function(){ 17 var $class = $(this).data('class'); 18 var lightbox = GLightbox(); 19 /*var isMobile = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i);*/ 20 var lightboxDescription = GLightbox({ 21 selector: $class, 22 moreLength:0, 23 touchNavigation: true, 24 lightboxHtml : '<div id="glightbox-body" class="exteam-lb glightbox-container">\ 25 <div class="gloader visible"></div>\ 26 <div class="goverlay"></div>\ 27 <div class="gcontainer">\ 28 <div id="glightbox-slider" class="gslider"></div>\ 29 <a class="gnext"></a>\ 30 <a class="gprev"></a>\ 31 <a class="gclose"></a>\ 32 </div>\ 33 </div>', 34 onOpen: function(slide, data) { 35 $('.exteam-lb .ginner-container .gslide-description').each(function(){ 36 var $this = $(this); 37 /*if(isMobile){ 38 $this.css('overflow','scroll'); 39 }else{*/ 40 $this.closest(".gslide ").addClass('ehd-scroll'); 41 $this.niceScroll({cursorcolor:"rgb(66, 66, 66)",horizrailenabled:false}); 42 setTimeout(function(){ 43 $this.getNiceScroll().resize(); 44 $this.closest(".gslide ").removeClass('ehd-scroll'); 45 }, 800); 46 /*}*/ 47 }); 48 }, 49 }); 50 }); 51 }; 52 extp_lightbox(); 53 // End lightbox js 54 55 //Start extsc-hidden(modal) 56 $('body').on("click",".fct-modal .ctgrid .item-grid, .fct-modal .ctlist .item-grid", function(event){ 57 $id_act = $(this).data('id'); 58 $id_parent = $(this).closest(".ex-tplist ").attr('id'); 59 event.preventDefault(); 60 $('.item-modl').removeClass('md-active').hide(); 61 $('#'+$id_act).addClass('md-active').show(); 62 $('.exp-modal-info').getNiceScroll().resize(); 63 $("#"+$id_parent+" .extsc-hidden").addClass('extsc-hidden-active'); 64 $("#"+$id_parent+" .ex-overlay").addClass('ex-overlay-active'); 65 setTimeout(function(){ 66 $('html').addClass('extp-hidden-scroll'); 67 }, 400); 68 }); 69 function extp_modal_info(){ 70 $('.exp-modal-info').each(function(){ 71 var $this = $(this); 72 $this.niceScroll({ 73 cursorcolor:"rgba(66, 66, 66, .8)", 74 autohidemode:'false', 75 background:"rgba(0, 0, 0,.15)", 76 cursorwidth: "6px", 77 }); 78 setTimeout(function(){ 79 $this.getNiceScroll().resize(); 80 }, 800); 81 }); 82 }; 83 $('.fct-modal .extp-mdbutton').on("click",".extp-mdleft", function(event){ 84 var $crr = $('.item-modl.md-active'); 85 var $prev = $('.item-modl.md-active').prev(); 86 if(!$prev.length){ return;} 87 $crr.fadeOut(300); 88 $prev.addClass('md-active').fadeIn(300); 89 setTimeout(function(){ 90 $('.exp-modal-info').getNiceScroll().resize(); 91 }, 400); 92 $crr.removeClass('md-active'); 93 }); 94 $('.fct-modal .extp-mdbutton').on("click",".extp-mdright", function(event){ 95 var $crr = $('.item-modl.md-active'); 96 var $nex = $('.item-modl.md-active').next(); 97 if(!$nex.length){ return;} 98 $crr.fadeOut(300); 99 $nex.addClass('md-active').fadeIn(300) 100 setTimeout(function(){ 101 $('.exp-modal-info').getNiceScroll().resize(); 102 }, 400); 103 $crr.removeClass('md-active'); 104 }); 105 $('.fct-modal .extp-mdbutton ').on("click",".extp-mdclose", function(event){ 106 $id_parent = $(this).closest(".ex-tplist ").attr('id'); 107 $("#"+$id_parent+" .ex-overlay").removeClass('ex-overlay-active'); 108 $("#"+$id_parent+" .extsc-hidden").removeClass('extsc-hidden-active'); 109 setTimeout(function(){ 110 $('html').removeClass('extp-hidden-scroll'); 111 }, 400); 112 }); 113 function extp_modal_overlay(){ 114 $('.fct-modal .ex-overlay').on("click", function(event){ 115 $(this).removeClass('ex-overlay-active'); 116 $id_parent = $(this).closest(".ex-tplist ").attr('id'); 117 $("#"+$id_parent+" .extsc-hidden").removeClass('extsc-hidden-active'); 118 setTimeout(function(){ 119 $('html').removeClass('extp-hidden-scroll'); 120 }, 400); 121 }); 122 }; 123 extp_modal_info(); 124 extp_modal_overlay(); 125 //End extsc-hidden(modal) 126 127 //Start collaps(expand) 128 $('body').on("click",".ex-tplist.fct-collapse .ctgrid .exp-arrow", function(event){ 129 event.preventDefault(); 130 var $this = $(this); 131 $parent = $(this).closest(".item-grid"); 132 if ($parent.hasClass('active-collaps')) { 133 $parent.removeClass('active-collaps'); 134 }else{ 135 $('.fct-collapse .item-grid').removeClass('active-collaps'); 136 $parent.addClass('active-collaps'); 137 } 138 $('html').addClass('ehd-scroll'); 139 $('.fct-collapse .item-grid .exp-expand-des').niceScroll({ 140 cursorcolor:"rgba(66, 66, 66, .8)", 141 //background: "rgba(0, 0, 0,.15)", 142 cursorwidth: "6px", 143 horizrailenabled:false, 144 autohidemode:false, 145 //railpadding: {top: '25px', right: 0, left: 0, bottom: '25px'} 146 }); 147 setTimeout(function(){ 148 $('.fct-collapse .item-grid .exp-expand-des').getNiceScroll().resize(); 149 $('html').removeClass('ehd-scroll'); 150 }, 500); 151 152 if($this.closest(".fct-collapse").hasClass('tp-dis-scrolltop')){ 153 return; 154 } 155 if($this.closest(".item-grid ").hasClass('active-collaps')){ 156 setTimeout(function(){ 157 var windowHeight = $(window).height(); 158 $('html,body').animate({ 159 scrollTop: ($this.offset().top + $this.height() - 100)}, 160 'slow'); 161 }, 300); 162 } 163 }); 164 $('body').on("click",".ex-tplist.fct-collapse .ctgrid .exp-expand-close",function(event){ 165 event.preventDefault(); 166 $parent = $(this).closest(".active-collaps"); 167 $parent.removeClass('active-collaps'); 168 setTimeout(function(){ 169 $('.fct-collapse .item-grid .exp-expand-des').getNiceScroll().resize(); 170 $('html').removeClass('ehd-scroll'); 171 }, 300); 172 }); 173 $('body').on("click",".ex-tplist.fct-collapse .ctgrid .exp-expand-next", function(event){ 174 event.preventDefault(); 175 $parent = $(this).closest(".active-collaps"); 176 $parent.removeClass('active-collaps'); 177 if ($parent.next().length > 0) { 178 $next = $parent.next().addClass('active-collaps'); 179 } 180 setTimeout(function(){ 181 $('.fct-collapse .item-grid .exp-expand-des').getNiceScroll().resize(); 182 $('html').removeClass('ehd-scroll'); 183 }, 300); 184 // scrolltop 185 setTimeout(function(){ 186 var windowHeight = $(window).height(); 187 var $ct_at = $('.fct-collapse .active-collaps figure'); 188 $('html,body').animate({ 189 scrollTop: ($ct_at.offset().top + $ct_at.height() - 100)}, 190 'slow'); 191 }, 500); 192 193 }); 194 $('body').on("click",".ex-tplist.fct-collapse .ctgrid .exp-expand-pre", function(event){ 195 event.preventDefault(); 196 $parent = $(this).closest(".active-collaps"); 197 $parent.removeClass('active-collaps'); 198 if ($parent.prev().length > 0) { 199 $prev = $parent.prev().addClass('active-collaps'); 200 } 201 setTimeout(function(){ 202 $('.fct-collapse .item-grid .exp-expand-des').getNiceScroll().resize(); 203 $('html').removeClass('ehd-scroll'); 204 }, 300); 205 // scrolltop 206 setTimeout(function(){ 207 var windowHeight = $(window).height(); 208 var $ct_at = $('.fct-collapse .active-collaps figure'); 209 $('html,body').animate({ 210 scrollTop: ($ct_at.offset().top + $ct_at.height() - 100)}, 211 'slow'); 212 }, 500); 213 }); 214 //End collaps 215 216 217 // Carousel 218 function extp_carousel(id_clas,infinite,start_on,rtl_mode,slidesshow,auto_play,auto_speed,$slidestoscroll,mbrp,tbrp,tlbrp){ 219 jQuery(id_clas).EX_ex_s_lick({ 220 infinite: infinite, 221 initialSlide:start_on, 222 rtl: rtl_mode =='yes' ? true : false, 223 prevArrow:'<button type="button" class="ex_s_lick-prev"><i class="fa fa-angle-left"></i></button>', 224 nextArrow:'<button type="button" class="ex_s_lick-next"><i class="fa fa-angle-right"></i></button>', 225 slidesToShow: slidesshow, 226 slidesToScroll: $slidestoscroll!='' ? $slidestoscroll : slidesshow, 227 dots: false, 228 autoplay: auto_play==1 ? true : false,
229 autoplaySpeed: auto_speed!='' ? auto_speed : 3000, 230 arrows: true, 231 centerMode: false, 232 focusOnSelect: true, 233 adaptiveHeight: true, 234 pauseOnFocus: false, 235 responsive: [ 236 { 237 breakpoint: !isNaN(tlbrp) ? tlbrp : 1024, 238 settings: { 239 slidesToShow: slidesshow, 240 slidesToScroll: $slidestoscroll!='' ? $slidestoscroll : slidesshow, 241 } 242 }, 243 { 244 breakpoint: !isNaN(tbrp) ? tbrp : 768, 245 settings: { 246 slidesToShow: 2, 247 slidesToScroll: 1 248 } 249 }, 250 { 251 breakpoint: !isNaN(mbrp) ? mbrp : 480, 252 settings: { 253 slidesToShow: 1, 254 slidesToScroll: 1 255 } 256 } 257 ] 258 259 }); 260 } 261 jQuery('.ex-tpcarousel').each(function(){ 262 var $this = jQuery(this); 263 var id = $this.attr('id'); 264 var slidesshow = $this.data('slidesshow'); 265 if(slidesshow==''){ slidesshow = 3;} 266 var startit = $this.data('startit') > 0 ? $this.data('startit') : 1; 267 var auto_play = $this.data('autoplay'); 268 var auto_speed = $this.data('speed'); 269 var slidestoscroll = $this.data('slidestoscroll'); 270 var rtl_mode = $this.data('rtl'); 271 var start_on = $this.data('start_on') > 0 ? $this.data('start_on') : 0; 272 if($this.data('infinite')=='0'){ 273 var infinite = 0; 274 }else{ 275 var infinite = $this.data('infinite') == 'yes' || $this.data('infinite') == '1' ? true : false; 276 } 277 var mbrp = $this.data('mbrp'); 278 var tbrp = $this.data('tbrp'); 279 var tlbrp = $this.data('tlbrp'); 280 extp_carousel('#'+id+' .ctgrid',infinite,start_on,rtl_mode,slidesshow,auto_play,auto_speed,slidestoscroll,mbrp,tbrp,tlbrp); 281 }); 282 // End Carousel 283 284 //DataTable 285 286 function extp_table_modal(){ 287 $('.fct-modal tbody').on("click", ".exp-td-first", function(event){ 288 event.preventDefault(); 289 var $next = $(this).next(); 290 $next.find(".item-grid").trigger('click'); 291 }); 292 }; 293 function extp_table_lightbox(){ 294 $('.fct-lightbox tbody').on("click",".exp-td-first", function(event){ 295 event.preventDefault(); 296 var $next = $(this).next(); 297 $next.find(".exlightbox").trigger('click'); 298 }); 299 }; 300 extp_table_modal(); 301 extp_table_lightbox(); 302 //End datatable 303 // ajax loadmore 304 function extp_ajax_load_page($style,$this_click,id_crsc,$page_link){ 305 if($style !='loadmore'){ 306 $('#'+id_crsc+' .page-numbers').removeClass('disable-click'); 307 } 308 if($('#'+id_crsc).hasClass('fct-collapse')){ 309 $('#'+id_crsc+'.fct-collapse .item-grid').removeClass('active-collaps'); 310 setTimeout(function(){ 311 $('#'+id_crsc+'.fct-collapse .item-grid .exp-expand-des').getNiceScroll().resize(); 312 }, 300); 313 } 314 $this_click.addClass('disable-click'); 315 var n_page = $('#'+id_crsc+' input[name=num_page_uu]').val(); 316 if($style=='loadmore'){ 317 $('#'+id_crsc+' .loadmore-exbt').addClass("loading"); 318 }else{ 319 $('#'+id_crsc).addClass("loading"); 320 } 321 var layout = $('#'+id_crsc).hasClass('table-layout') ? 'table' : ''; 322 if($('#'+id_crsc).hasClass('list-layout')){ layout = 'list';} 323 var param_query = $('#'+id_crsc+' input[name=param_query]').val(); 324 var param_ids = $('#'+id_crsc+' input[name=param_ids]').val(); 325 var page = $('#'+id_crsc+' input[name=current_page]').val(); 326 if($page_link!='' && $page_link < page){ 327 param_ids = ''; 328 } 329 var num_page = $('#'+id_crsc+' input[name=num_page]').val(); 330 var ajax_url = $('#'+id_crsc+' input[name=ajax_url]').val(); 331 var param_shortcode = $('#'+id_crsc+' input[name=param_shortcode]').val(); 332 var char_ft = $('#'+id_crsc+' .etp-alphab a').length ? $('#'+id_crsc+' .etp-alphab a.current').data('value') : ''; 333 var param = { 334 action: 'extp_loadmore', 335 param_query: param_query, 336 param_ids: param_ids, 337 id_crsc: id_crsc, 338 page: $page_link!='' ? $page_link : page*1+1, 339 param_shortcode: param_shortcode, 340 layout: layout, 341 char: char_ft, 342 }; 343 $.ajax({
344 type: "post", 345 url: ajax_url, 346 dataType: 'json', 347 data: (param), 348 success: function(data){ 349 if(data != '0') 350 { 351 if($style=='loadmore'){ 352 n_page = n_page*1+1; 353 $('#'+id_crsc+' input[name=num_page_uu]').val(n_page) 354 if(data.html_content == ''){ 355 $('#'+id_crsc+' .loadmore-exbt').remove(); 356 }else{ 357 $('#'+id_crsc+' input[name=current_page]').val(page*1+1); 358 if(layout=='table'){ 359 var $g_container = $('#'+id_crsc+' table tbody'); 360 $g_container.append(data.html_content); 361 }else if(layout=='list'){ 362 var $g_container = $('#'+id_crsc+' .ctlist'); 363 $g_container.append(data.html_content); 364 }else{ 365 var $g_container = $('#'+id_crsc+' .ctgrid'); 366 $g_container.append(data.html_content); 367 setTimeout(function(){ 368 $('#'+id_crsc+' .item-grid').addClass("active"); 369 }, 200); 370 } 371 $('#'+id_crsc+' .loadmore-exbt').removeClass("loading"); 372 $this_click.removeClass('disable-click'); 373 } 374 if(n_page == num_page){ 375 $('#'+id_crsc+' .loadmore-exbt').remove(); 376 } 377 }else{ 378 if(layout=='table'){ 379 $showin = $('#'+id_crsc+' table tbody'); 380 }else if(layout=='list'){ 381 $showin = $('#'+id_crsc+' .ctlist'); 382 }else{ 383 $showin = $('#'+id_crsc+' .ctgrid'); 384 } 385 $($showin).fadeOut({ 386 duration:0, 387 complete:function(){ 388 $( this ).empty(); 389 } 390 });
391 $('#'+id_crsc).removeClass("loading"); 392 $showin.append(data.html_content).fadeIn(); 393 394 } 395 if(data.html_modal!=''){ 396 // $('#'+id_crsc+' .extsc-hidden .exp-mdcontaner').fadeOut({ 397 // duration:0, 398 // complete:function(){ 399 // $( this ).empty(); 400 // } 401 // }); 402 $('#'+id_crsc+' .extsc-hidden .exp-mdcontaner').append(data.html_modal).fadeIn(); 403 } 404 extp_lightbox(); 405 extp_modal_info(); 406 extp_table_modal(); 407 extp_table_lightbox(); 408 409 if($('#'+id_crsc).hasClass('extp-masonry') && !$('#'+id_crsc).hasClass('column-1')){ 410 if (typeof imagesLoaded === "function"){ 411 $('#'+id_crsc+'.extp-masonry .ctgrid').imagesLoaded( function() { 412 $('#'+id_crsc+'.extp-masonry .ctgrid').masonry('reloadItems'); 413 $('#'+id_crsc+'.extp-masonry .ctgrid').masonry({ 414 isInitLayout : false, 415 horizontalOrder: true, 416 itemSelector: '.item-grid' 417 }); 418 }); 419 } 420 } 421 var count_ids = $('#'+id_crsc+' input[name=param_ids]').val(); 422 var total_item = $('#'+id_crsc+' input[name=total_item]').val(); 423 var count_sp = (count_ids.match(/,/g) || []).length; 424 if(count_sp == (total_item - 1) ){ 425 $('#'+id_crsc+' input[name=param_ids]').val('[]'); 426 } 427 428 if($style!='loadmore' && !jQuery('#'+id_crsc+'.extp-dis-scroll').length){ 429 var windowHeight = jQuery(window).height(); 430 jQuery('html,body').animate({ 431 scrollTop: jQuery('#'+id_crsc).offset().top - 50}, 432 'slow'); 433 } 434 }else{$('#'+id_crsc+' .loadmore-exbt').html('error');} 435 } 436 }); 437 return false; 438 } 439 function extp_loadmore(){ 440 $('body').on('click', '.loadmore-exbt', function() { 441 if($(this).hasClass('disable-click')){ 442 return; 443 } 444 var $this_click = $(this); 445 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 446 extp_ajax_load_page($style ='loadmore' ,$this_click,id_crsc,''); 447 }); 448 } 449 extp_loadmore(); 450 // End load more 451 452 //Start paging 453 $('body').on('click','.ex-tplist .extp-pagination-parent .page-numbers',function(event) { 454 event.preventDefault(); 455 var $this_click = $(this); 456 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 457 $('#'+id_crsc+' .page-numbers').removeClass('current'); 458 $($this_click).addClass('current'); 459 $page_link = $this_click.text(); 460 if($page_link*1 > 1){ 461 $('#'+id_crsc+' .prev-ajax').removeClass('disable-click'); 462 } 463 $('#'+id_crsc+' .next-ajax').removeClass('disable-click'); 464 extp_ajax_load_page($style ='page_link',$this_click,id_crsc,$page_link); 465 }); 466 $('body').on('click','.ex-tplist .extp-pagination-parent .next-ajax',function(event) { 467 event.preventDefault(); 468 var $this_click = $(this); 469 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 470 var $current = $('#'+id_crsc+' .page-navi .current'); 471 var current_page = $current.text(); 472 $('#'+id_crsc+' .prev-ajax').removeClass('disable-click'); 473 474 $current.removeClass('current'); 475 $current.next().addClass('current'); 476 $page_link = current_page*1+1; 477 extp_ajax_load_page($style ='page_link',$this_click,id_crsc,$page_link); 478 $this_click.removeClass('disable-click'); 479 }); 480 $('body').on('click','.ex-tplist .extp-pagination-parent .prev-ajax',function(event) { 481 event.preventDefault(); 482 var $this_click = $(this); 483 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 484 var $current = $('#'+id_crsc+' .page-navi .current'); 485 var current_page = parseInt($current.text()); 486 $('#'+id_crsc+' .next-ajax').removeClass('disable-click'); 487 if (current_page == 1) { 488 $('#'+id_crsc+' .prev-ajax').addClass('disable-click'); 489 return false; 490 } 491 $current.removeClass('current'); 492 $current.prev().addClass('current'); 493 $page_link = current_page-1; 494 extp_ajax_load_page($style ='page_link',$this_click,id_crsc,$page_link); 495 if($page_link*1 > 1){ 496 $('#'+id_crsc+' .prev-ajax').removeClass('disable-click'); 497 } 498 }); 499 $('body').on('click','.etp-alphab ul li a',function(event) { 500 event.preventDefault(); 501 var $this_click = $(this); 502 var char_ft = $(this).data('value'); 503 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 504 var cat = $('#'+id_crsc+' select[name=extp_cat]').val(); 505 var loc = $('#'+id_crsc+' select[name=extp_location]').val(); 506 if (loc == undefined) {loc ='';} 507 var key_word = $('#'+id_crsc+' input[name=s]').val(); 508 if($('.etp-alphab').hasClass('extp-rssf')){ 509 $('#'+id_crsc+' input[name=s]').val(''); 510 key_word = ''; 511 } 512 var mode = 'alphab'; 513 extp_ajax_search($this_click,char_ft,key_word,cat,mode,loc); 514 return false; 515 });
516 function extp_ajax_search($this_click,$char_ft, $key_word,$cat,mode,location){ 517 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 518 if($('#'+id_crsc).hasClass('fct-collapse')){ 519 $('#'+id_crsc+'.fct-collapse .item-grid').removeClass('active-collaps'); 520 setTimeout(function(){ 521 $('#'+id_crsc+'.fct-collapse .item-grid .exp-expand-des').getNiceScroll().resize(); 522 }, 300); 523 } 524 $('#'+id_crsc+' .etp-alphab a').removeClass('current'); 525 if(mode=='alphab'){ 526 $($this_click).addClass('current'); 527 }else{ 528 $('#'+id_crsc+' .etp-alphab li:first-child a').addClass('current'); 529 } 530 var layout = $('#'+id_crsc).hasClass('table-layout') ? 'table' : ''; 531 $('#'+id_crsc).addClass("loading"); 532 if($('#'+id_crsc).hasClass('list-layout')){ layout = 'list';} 533 var param_query = $('#'+id_crsc+' input[name=param_query]').val(); 534 var ajax_url = $('#'+id_crsc+' input[name=ajax_url]').val(); 535 var param_shortcode = $('#'+id_crsc+' input[name=param_shortcode]').val(); 536 var param = { 537 action: 'extp_filter_alphab', 538 param_query: param_query, 539 id_crsc: id_crsc, 540 param_shortcode: param_shortcode, 541 layout: layout, 542 char: $char_ft, 543 key_word: $key_word, 544 cat: $cat, 545 location: location, 546 }; 547 $.ajax({ 548 type: "post", 549 url: ajax_url, 550 dataType: 'json', 551 data: (param), 552 success: function(data){ 553 if(data != '0') 554 { 555 if($('#'+id_crsc+' .ex-loadmore').length){ 556 var $loadmore=1; 557 if(data.page_navi =='off'){ 558 $('#'+id_crsc+' .ex-loadmore .loadmore-exbt').remove(); 559 }else{ 560 $('#'+id_crsc+' .ex-loadmore').remove(); 561 } 562 563 }; 564 $('#'+id_crsc+' input[name=num_page_uu]').val('1'); 565 $('#'+id_crsc+' input[name=current_page]').val('1'); 566 if(layout=='table'){ 567 $showin = $('#'+id_crsc+' table tbody'); 568 }else if(layout=='list'){ 569 $showin = $('#'+id_crsc+' .ctlist'); 570 }else{ 571 $showin = $('#'+id_crsc+' .ctgrid'); 572 } 573 $($showin).fadeOut({ 574 duration:0, 575 complete:function(){ 576 $( this ).empty(); 577 } 578 }); 579 if(data.page_navi !='' && data.page_navi !='off'){ 580 if ($loadmore ==1) { 581 $('#'+id_crsc).append(data.page_navi); 582 } 583 else{ 584 $('#'+id_crsc+' .extp-pagination').fadeOut({ 585 duration:0, 586 complete:function(){ 587 $( this ).remove(); 588 } 589 });
590 $('#'+id_crsc+' .extp-pagination-parent').append(data.page_navi); 591 } 592 }else if(data.page_navi=='off'){ 593 $('#'+id_crsc+' .extp-pagination .page-navi').fadeOut({ 594 duration:0, 595 complete:function(){ 596 $( this ).remove(); 597 } 598 }); 599 } 600 $('#'+id_crsc).removeClass("loading"); 601 $showin.append(data.html_content).fadeIn(); 602 if(data.html_modal!=''){ 603 $('#'+id_crsc+' .extsc-hidden .exp-mdcontaner').fadeOut({ 604 duration:0, 605 complete:function(){ 606 $( this ).empty(); 607 } 608 }); 609 setTimeout(function(){ 610 $('#'+id_crsc+' .extsc-hidden .exp-mdcontaner').append(data.html_modal).fadeIn(); 611 }, 300); 612 } 613 if($('#'+id_crsc+' .extp-dcat').length){ 614 $('#'+id_crsc+' .extp-dcat').remove(); 615 } 616 $(data.html_dcat).insertBefore($showin); 617 extp_lightbox(); 618 extp_modal_info(); 619 extp_table_modal(); 620 extp_table_lightbox(); 621 extp_loadmore(); 622 if($('#'+id_crsc).hasClass('extp-masonry') && !$('#'+id_crsc).hasClass('column-1')){ 623 if (typeof imagesLoaded === "function"){ 624 $('#'+id_crsc+'.extp-masonry .ctgrid').imagesLoaded( function() { 625 $('#'+id_crsc+'.extp-masonry .ctgrid').masonry('reloadItems'); 626 $('#'+id_crsc+'.extp-masonry .ctgrid').masonry({ 627 isInitLayout : false, 628 horizontalOrder: true, 629 itemSelector: '.item-grid' 630 }); 631 });
632 } 633 } 634 }else{$('#'+id_crsc+' .loadmore-exbt').html('error');} 635 } 636 }); 637 638 }; 639 //search 640 $('body').on('click','.ex-tplist .tp-search-submit',function(event) { 641 event.preventDefault(); 642 var $this_click = $(this); 643 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 644 var cat = $('#'+id_crsc+' select[name=extp_cat]').val(); 645 var loc = $('#'+id_crsc+' select[name=extp_location]').val(); 646 if (loc == undefined) {loc ='';} 647 if($this_click.hasClass('extp-rsft')){ 648 $('#'+id_crsc+' select[name=extp_cat]').val(''); 649 $('#'+id_crsc+' select[name=extp_location]').val(''); 650 $('#'+id_crsc+' .extp-top-cat > li').removeClass('extp-child-active'); 651 $('#'+id_crsc+' .extp-top-cat > li:first-child').addClass('extp-child-active'); 652 cat = loc = ''; 653 } 654 var key_word = $('#'+id_crsc+' input[name=s]').val(); 655 var mode = 'search'; 656 extp_ajax_search($this_click,'',key_word,cat,mode,loc); 657 return false; 658 }); 659 $('body').on('change','.ex-tplist select[name=extp_cat]',function(event) { 660 event.preventDefault(); 661 var $this_click = $(this); 662 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 663 var cat = $('#'+id_crsc+' select[name=extp_cat]').val(); 664 var loc = $('#'+id_crsc+' select[name=extp_location]').val(); 665 if (loc == undefined) {loc ='';} 666 var key_word = $('#'+id_crsc+' input[name=s]').val(); 667 var mode = 'search'; 668 extp_ajax_search($this_click,'',key_word,cat,mode,loc); 669 return false; 670 }); 671 // location filter 672 $('body').on('change','.ex-tplist select[name=extp_location]',function(event) { 673 event.preventDefault(); 674 var $this_click = $(this); 675 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 676 var cat = $('#'+id_crsc+' select[name=extp_cat]').val(); 677 var loc = $('#'+id_crsc+' select[name=extp_location]').val(); 678 if (cat == undefined) {cat ='';} 679 var key_word = $('#'+id_crsc+' input[name=s]').val(); 680 if (key_word == undefined) {key_word ='';} 681 var mode = 'search'; 682 extp_ajax_search($this_click,'',key_word,cat,mode,loc); 683 return false; 684 }); 685 // child cat category click 686 $('body').on('click','.ex-tplist .extp-search .extp-child_cat.extp-cat-box .extp-child-click',function(event) { 687 event.preventDefault(); 688 var $this_click = $(this); 689 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 690 var $parent = $this_click.closest(".extp-child_cat"); 691 $parent.find('.extp-child-click').removeClass('extp-child-active'); 692 $this_click.addClass('extp-child-active'); 693 $this_click.parents('li.extp-child-click').addClass('extp-child-active'); 694 var val = $(this).data('value'); 695 jQuery('#'+id_crsc+' .extp-search-group > select option').each(function(){ 696 if($(this).val() == val){ 697 $('#'+id_crsc+' .extp-search-group > select').val(val).trigger('change'); 698 } 699 }); 700 return false; 701 }); 702 // child cat location 703 $('body').on('click','.ex-tplist .extp-loc_parent .extp-child_cat .extp-child-click',function(event) { 704 event.preventDefault(); 705 var $this_click = $(this); 706 var id_crsc = $this_click.closest(".ex-tplist").attr('id'); 707 var $parent = $this_click.closest(".extp-child_cat"); 708 $parent.find('.extp-child-click').removeClass('extp-child-active'); 709 $this_click.addClass('extp-child-active'); 710 $this_click.parents('li.extp-child-click').addClass('extp-child-active'); 711 var val = $(this).data('value'); 712 jQuery('#'+id_crsc+' .extp-loc > select option').each(function(){ 713 if($(this).val() == val){ 714 $('#'+id_crsc+' .extp-loc > select').val(val).trigger('change'); 715 } 716 }); 717 return false; 718 }); 719 // Scroll if collapse 720 /*$('body').on('click', '.fct-collapse figure',function(event) { 721 var $this = $(this); 722 if($this.closest(".fct-collapse").hasClass('tp-dis-scrolltop')){ 723 return; 724 } 725 if($this.closest(".item-grid ").hasClass('active-collaps')){ 726 setTimeout(function(){ 727 var windowHeight = $(window).height(); 728 $('html,body').animate({ 729 scrollTop: ($this.offset().top + $this.height() - 100)}, 730 'slow'); 731 }, 300); 732 } 733 });*/ 734 }); 735}(jQuery));
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.