1if (typeof meuajax == 'undefined') { 2 var meuajax = { 3 ajaxurl: "/wp-admin/admin-ajax.php" 4 } 5} 6 7/* commented code moved to header.php */ 8 9// const PROPAGESIZE = 12; 10// const fnGetLawyers = () => { 11// let Lawyers = sessionStorage.getItem('DBLPROS'); 12// if (Lawyers == "" || typeof Lawyers === 'undefined') { 13// let Lawyers = window.dblpros; 14// } 15// return JSON.parse(Lawyers); 16// } 17 18 19// var datasetLawyersSave = fnGetLawyers(), 20// datasetLawyers = datasetLawyersSave, 21// datasetLawyersCurrentPage = 0, 22// datasetLawyersPageSize = 12; 23 24 25 26 27// const fnFilterLaywers = () => { 28 29// let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 30 31// let Lawyers = fnGetLawyers(), 32// term = $(`${device} #attorney_name_search`).val() || '', 33// practice = Number($(`${device} #menu_practice_id`).val()) || 0, 34// industry = Number($(`${device} #menu_industry_id`).val()) || 0, 35// office = Number($(`${device} #menu_office_id`).val()) || 0, 36// state = $(`${device} #menu_adm_state`).val() || "", 37// court = $(`${device} #menu_adm_court`).val() || "", 38// sortby = $(`${device} #attornysortby`).val() || "", 39// veteran_status = $(`${device} #menu_veteran`).val() || ""; 40 41 42 43// Lawyers = Lawyers.filter(Lawyer => Lawyer.title.toLowerCase().includes(term.toLowerCase())); 44 45// if(practice != undefined && Number(practice) && practice) { 46// Lawyers = Lawyers.filter(Lawyer => Array.isArray(Lawyer.practices) ? Lawyer.practices.find( v => v == practice ) : false); 47// } 48 49// if(office != undefined && Number(office) && office) { 50 51// Lawyers = Lawyers.filter(Lawyer => Array.isArray(Lawyer.offices) ? Lawyer.offices.find( v => v == office ) : false); 52// Lawyers = Lawyers.filter((Lawyer) => Lawyer.designation !== 'Legal Service Attorney') 53 54// } 55 56// if(industry != undefined && Number(industry) && industry) { 57// Lawyers = Lawyers.filter(Lawyer => Array.isArray(Lawyer.industries) ? Lawyer.industries.find( v => v == industry ) : false); 58// } 59// if(state != undefined && state) { 60 61// Lawyers = Lawyers.filter(Lawyer => Array.isArray(Lawyer.state_ids) ? Lawyer.state_ids.find( v => v == state ) : false); 62// } 63// if(court != undefined && court) { 64 65// Lawyers = Lawyers.filter(Lawyer => Array.isArray(Lawyer.court_ids) ? Lawyer.court_ids.find( v => v == court ) : false); 66 67// // Lawyers = Lawyers.filter(Lawyer => Array.isArray(Lawyer.admissions) ? Lawyer.admissions.find( v => v == court ) : false); 68// // if (court.search("U.S") > -1) { 69// // court = court.replace("U.S", "U.S."); 70// // var testing = Lawyers.filter(Lawyer => Array.isArray(Lawyer.admissions) ? Lawyer.admissions.find( v => v == court ) : false); 71// // console.log(testing); 72// // } 73// } 74// if(veteran_status != undefined && veteran_status) { 75 76// Lawyers = Lawyers.filter(Lawyer => Array.isArray(Lawyer.veteran_status) ? Lawyer.veteran_status.find( v => v == veteran_status ) : false); 77// } 78 79// if (sortby == 'title') { 80// Lawyers.sort(function(a, b){ 81// if(a.last_name < b.last_name) { return -1; } 82// if(a.last_name > b.last_name) { return 1; } 83// return 0; 84// }) 85// } 86// // if (sortby == 'designation') { 87// // Lawyers.sort(function(a, b){ 88// // if(a.designation < b.designation) { return -1; } 89// // if(a.designation > b.designation) { return 1; } 90// // return 0; 91// // }) 92// // } 93 94 95 96// datasetLawyersSave = Lawyers; 97// datasetLawyers = datasetLawyersSave.slice( 0, PROPAGESIZE); 98 99// } 100 101// //let HTML = data.slice(0, 12).map(d => { 102// const fnRenderLawyers = () => { 103 104// let HTML = datasetLawyers.map(d => { 105// return ( 106// `<div class="col-lg-3 col-md-6 col-sm-6 col-xs-12"> 107// <a href="${d.url}"> 108// <div class="img-wrapepr "> 109// <img src="${d.img}"> 110// </div> 111 112// <div class="title-wrapepr"> 113// <h3 class="title">${d.title}</h3>
114// <span class="title">${d.designation}</span> 115// </div> 116// </a> 117// </div>` 118// ) 119// }); 120 121// $('.attorneys-list').html(HTML.length ? HTML : "<p class='no-record'> No Record Found </p>"); 122// } 123 124 125jQuery(document).ready(function ($) { 126 var $ = jQuery; 127 $('body').addClass('hide-visible-section'); 128 $('body').removeClass('has-background-white'); 129 $('#page').removeClass('site'); 130 131 // $(document).on('keyup', '#attorney_name_search', function (e) { 132 // e.preventDefault(); 133 134 // let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 135 // $(`${device} #attorney_name_search`).val($(this).val()); 136 137 138 // fnFilterLaywers(); 139 // fnRenderLawyers(); 140 141 // $(".previous-page").hide(); 142 // $(".next-page").hide(); 143 144 // datasetLawyersCurrentPage = 0; 145 // datasetLawyersPageSize = PROPAGESIZE; 146 147 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 148 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 149 150 // }); 151 152 // $('body').on('click', '.reset-attorney-filters', function (e) { 153 // e.preventDefault(); 154 // $('.menu_practice_id').val(''); 155 // $('.menu_industry_id').val(''); 156 // $('.menu_office_id').val(''); 157 // $('.attorney_name_search').val(''); 158 // $('.practice-dropdown > span').text('Select'); 159 // $('.industry-dropdown-attorny > span').text('Select'); 160 // $('.office-dropdown-attorny > span').text('Select'); 161 162 // datasetLawyersSave = fnGetLawyers(); 163 // datasetLawyers = datasetLawyersSave.slice( 0, PROPAGESIZE); 164 165 // fnRenderLawyers(); 166 167 // $(".next-page").show(); 168 169 // }); 170 171 172 // $('body').on('click', '.practice-dropdown-menu a', function (e) { 173 // let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 174 // $(`${device} #menu_practice_id`).val($(this).data('val')); 175 176 // fnFilterLaywers(), fnRenderLawyers(); 177 178 // $(".previous-page").hide(); 179 // $(".next-page").hide(); 180 181 // datasetLawyersCurrentPage = 0; 182 // datasetLawyersPageSize = PROPAGESIZE; 183 184 185 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 186 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 187 188 // }); 189 190 // $('body').on('click', '.industry-dropdown-menu a', function (e) { 191 // let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 192 // $(`${device} #menu_industry_id`).val($(this).data('val')); 193 194 // fnFilterLaywers(), fnRenderLawyers(); 195 196 // $(".previous-page").hide(); 197 // $(".next-page").hide(); 198 199 // datasetLawyersCurrentPage = 0; 200 // datasetLawyersPageSize = PROPAGESIZE; 201 202 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 203 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 204 // }); 205 206 // $('body').on('click', '.office-dropdown-menu a', function (e) { 207 208 // let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 209 // $(`${device} #menu_office_id`).val($(this).data('val')); 210 211 // fnFilterLaywers(), fnRenderLawyers(); 212 213 // $(".previous-page").hide(); 214 // $(".next-page").hide(); 215 216 // datasetLawyersCurrentPage = 0; 217 // datasetLawyersPageSize = PROPAGESIZE; 218 219 220 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 221 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 222 223 // }); 224 // $('body').on('click', '.court-dropdown-menu a', function (e) { 225 226 // let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 227 // $(`${device} #menu_adm_court`).val($(this).data('val')); 228 229 // fnFilterLaywers(), fnRenderLawyers(); 230 231 // $(".previous-page").hide(); 232 // $(".next-page").hide(); 233 234 // datasetLawyersCurrentPage = 0; 235 // datasetLawyersPageSize = PROPAGESIZE; 236 237 238 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 239 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 240 241 // }); 242 // $('body').on('click', '.state-dropdown-menu a', function (e) { 243 244 // let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 245 // $(`${device} #menu_adm_state`).val($(this).data('val')); 246 247 // fnFilterLaywers(), fnRenderLawyers(); 248 249 // $(".previous-page").hide(); 250 // $(".next-page").hide(); 251 252 // datasetLawyersCurrentPage = 0; 253 // datasetLawyersPageSize = PROPAGESIZE; 254 255 256 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 257 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 258 259 // }); 260 261 // $('body').on('click', '.sort-dropdown-menu a', function (e) { 262 263 // let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 264 // $(`${device} #attornysortby`).val($(this).data('val')); 265 266 // fnFilterLaywers(), fnRenderLawyers(); 267 268 // $(".previous-page").hide(); 269 // $(".next-page").hide(); 270 271 // datasetLawyersCurrentPage = 0; 272 // datasetLawyersPageSize = PROPAGESIZE; 273 274 275 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 276 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 277 278 // }); 279 // $('body').on('click', '.veteran-dropdown-menu a', function (e) { 280 281 // let device = $(window).width() < 768 ? ".mobile-menu-wrapper" : ".right-second-menu"; 282 // $(`${device} #menu_veteran`).val($(this).data('val')); 283 284 // fnFilterLaywers(), fnRenderLawyers(); 285 286 // $(".previous-page").hide(); 287 // $(".next-page").hide(); 288 289 // datasetLawyersCurrentPage = 0; 290 // datasetLawyersPageSize = PROPAGESIZE; 291 292 293 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 294 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 295 296 // }); 297 298 299 // $('body').on('submit', '#attorney-menu-filter', function (e) { 300 // e.preventDefault(); 301 // fnFilterLaywers(), fnRenderLawyers(); 302 // }); 303 304 305 // $(document).on('click', '.next-page', function (e) { 306 // e.preventDefault(); 307 // fnRenderLawyers(); 308 // if(datasetLawyersPageSize < datasetLawyersSave.length ) { 309 310 // datasetLawyers = datasetLawyersSave.slice( datasetLawyersCurrentPage + PROPAGESIZE, datasetLawyersPageSize + PROPAGESIZE ); // Default 0 to 12 already rendered 311 312 // datasetLawyersCurrentPage += PROPAGESIZE; 313 // datasetLawyersPageSize += PROPAGESIZE; 314 315 // $(".previous-page").show(); 316 // datasetLawyersPageSize > datasetLawyersSave.length ? $(".next-page").hide() : $(".next-page").show(); 317 // } 318 319 // fnRenderLawyers(); 320 // }); 321 322 // $(document).on('click', '.previous-page', function (e) { 323 // e.preventDefault(); 324 // fnRenderLawyers(); 325 // if(datasetLawyersPageSize > PROPAGESIZE ) { 326 327 // datasetLawyers = datasetLawyersSave.slice( datasetLawyersCurrentPage - PROPAGESIZE, datasetLawyersPageSize - PROPAGESIZE ); // Default 0 to 12 already rendered 328 329 // datasetLawyersCurrentPage -= PROPAGESIZE; 330 // datasetLawyersPageSize -= PROPAGESIZE; 331 332 // datasetLawyersPageSize <= PROPAGESIZE ? $(".previous-page").hide() : $(".previous-page").show(); 333 // $(".next-page").show(); 334 // } 335 336 // fnRenderLawyers(); 337 // }); 338 339 340 341 342 343 344 /** 345 * All set above 346 */ 347 348 349 350 351 352 353 354 $('#gform_wrapper_1 .gform_required_legend').remove(); 355 $('#gform_wrapper_2 .gform_required_legend').remove(); 356 $('#gform_wrapper_7 .gform_required_legend').remove(); 357 var req_text = "<div class='gform_required_legend gfield gfield--width-full'><span class='gfield_required gfield_required_asterisk'>*</span> indicates required fields</div>"; 358 $(req_text).insertAfter($('#field_1_5')) 359 $(req_text).insertAfter($('#field_3_5')) 360 $(req_text).insertAfter($('#field_2_5')) 361 $(req_text).insertAfter($('#field_7_5')) 362 363 364 365 $('.readmore_list').each(function (i, obj) { 366 if ($(this).children().length > 4) { 367 $('<a class="readmore_list_btn" href="javascript:;">Read More</a>').insertAfter($(this)); 368 } 369 }); 370 371 $('.readmore_list_10').each(function (i, obj) { 372 if ($(this).children().length > 10) { 373 $('<a class="readmore_list_btn" href="javascript:;">Read More</a>').insertAfter($(this)); 374 } 375 }); 376 377 $('.readmore_list_btn').one("click", readmore_show); 378 379 function readmore_show() { 380 $(this).siblings('.readmore_list').addClass('list_show'); 381 $(this).siblings('.readmore_list_10').addClass('list_show'); 382 $(this).text('Show Less'); 383 $(this).one("click", readmore_hide); 384 window.next_div_offset = jQuery('.content-sidebar-main').next().offset().top; 385 if (window.next_div_offset == 0) { 386 window.next_div_offset = jQuery('footer').offset().top + 20; 387 } 388 389 } 390 391 function readmore_hide() { 392 $(this).siblings('.readmore_list').removeClass('list_show'); 393 $(this).siblings('.readmore_list_10').removeClass('list_show'); 394 $(this).text('Read More'); 395 $(this).one("click", readmore_show); 396 window.next_div_offset = jQuery('.content-sidebar-main').next().offset().top; 397 if (window.next_div_offset == 0) { 398 window.next_div_offset = jQuery('footer').offset().top + 20; 399 } 400 } 401 402 403 $("#btn").on("click", function (ev) { 404 ev.preventDefault(); 405 $('body').toggleClass('popup-form-opened'); 406 }); 407 $('body').on('click', '.podcast-img-click', function (ev) { 408 var link = $(this).data('link'); 409 410 window.location.href = link; 411 412 }) 413 414 //sidemenu 415 jQuery('body').on('click', 'ul.side-menu > li > a', function (e) { 416 417 // If the menu item has the "item-border" class... 418 if( jQuery(this).parent('li').hasClass('item-border') ){ 419 420 // Abort. Otherwise, proceed. 421 return; 422 } 423 424 e.preventDefault(); 425 426 427 if ($(window).width() > 991) { 428 jQuery(this).parent('li').parent('ul').children('li').removeClass('active'); 429 jQuery(this).parent('li').addClass('active'); 430 } else { 431 var is_active = true; 432 if (!jQuery(this).parent('li').hasClass('active')) { 433 is_active = false;
434 } 435 jQuery(this).parent('li').parent('ul').children('li').removeClass('active'); 436 if (is_active == false) { 437 jQuery(this).parent('li').addClass('active'); 438 } else { 439 jQuery(this).parent('li').removeClass('active'); 440 } 441 442 } 443 444 445 if (jQuery(this).parent('li').attr('id') == 'right-menu-2') { 446 jQuery('.right-second-menu').show(); 447 jQuery('.right-first-menu').hide(); 448 jQuery('.right-third-menu').hide(); 449 } 450 if (jQuery(this).parent('li').attr('id') == 'right-menu-3') { 451 jQuery('.right-third-menu').show(); 452 jQuery('.right-second-menu').hide(); 453 jQuery('.right-first-menu').hide(); 454 } 455 if (jQuery(this).parent('li').attr('id') == 'right-menu-1') { 456 jQuery('.right-first-menu').show(); 457 jQuery('.right-third-menu').hide(); 458 jQuery('.right-second-menu').hide(); 459 } 460 461 if (jQuery(this).data('target')) { 462 jQuery('.right-menu-tab-content').removeClass('active'); 463 var attr = jQuery(this).data('target'); 464 jQuery(attr).addClass('active'); 465 466 } 467 if (jQuery(this).data('redirect')) { 468 var urltoredirect = jQuery(this).attr('href'); 469 window.location.href = urltoredirect; 470 } 471 472 }); 473 474 //pageload sidemenu 475 jQuery('.right-first-menu').show(); 476 jQuery('.right-second-menu').hide(); 477 jQuery('.right-third-menu').hide(); 478 479 //default practices display 480 $('.practices-list .all-practices').hide(); 481 $('.practices-list .all-practices.active').show(); 482 483 //onclick display respective practices data 484 jQuery('ul.practice-list li').click(function (e) { 485 jQuery(this).addClass('active'); 486 jQuery(this).parent().children('li').not(this).removeClass('active'); 487 488 var current = jQuery(this).attr('data'); 489 $('.practices-list .all-practices.active').removeClass('active'); 490 $('.' + current).addClass('active'); 491 $('.practices-list .all-practices').hide(); 492 $('.' + current).show(); 493 }); 494 495 //industries single page toggle active on tabbing 496 jQuery('ul.industry-tab li a').click(function (e) { 497 e.preventDefault(); 498 $('ul.industry-tab li a').removeClass('active'); 499 $('ul.industry-tab li a').addClass('notclicked'); 500 jQuery(this).removeClass('notclicked'); 501 jQuery(this).addClass('active'); 502 jQuery(this).addClass('clicked'); 503 504 setTimeout(function () { 505 $('ul.industry-tab li a').removeClass('clicked'); 506 $('ul.industry-tab li a').removeClass('notclicked'); 507 }, 1000); 508 509 510 }); 511 512 /** custom tab using elementor list items */ 513 $('.custom-tab-dbl ul li:first-child').addClass('active'); 514 515 516 517 518 $('body').on('click', '.showmore-attornies', function (evt) { 519 evt.preventDefault(); 520 var elem = $(this); 521 var page = parseInt($(this).data('cp') + 1); // get default page no 522 var current_text = elem.text(); 523 elem.text('Loading...'); 524 elem.prop('disabled', true); 525 $("#loading").show(); // Show loading snipper 526 $.ajax({ 527 url: meuajax.ajaxurl, 528 type: 'GET', 529 data: $('#attorny-form-filter').serialize() + "&action=load_attornies&load_page=" + page, 530 success: function (data) { 531 elem.prop('disabled', false); 532 var res = $.parseJSON(data); 533 elem.text(current_text); 534 $('#attorny-wrapper').append(res.html); 535 if (res.post_count < 16) { 536 elem.hide(); 537 } 538 $('#loaded-attorny').text($('.attorny-item').length); 539 elem.data('cp', page); //increase page no 540 541 } 542 }); 543 }); 544 545 546 $(document).on("click", ".readMore,.readLess", function () { 547 $(this).closest(".addReadMore").toggleClass("showlesscontent showmorecontent"); 548 549 // 550 $(this).closest(".addReadMore").find( ".ellipsis" ).toggle(); 551 552 window.next_div_offset = jQuery('.content-sidebar-main').next().offset().top; 553 if (window.next_div_offset == 0) { 554 window.next_div_offset = jQuery('footer').offset().top + 20; 555 } 556 557 558 }); 559 560 $('body').on('click', '.menu-item.practices-menu a', function (e) { 561 e.preventDefault(); 562 if ($(window).width() > 991) { 563 $('#toogle-menu').prop('checked', true); 564 $('#right-menu-1 a').trigger('click'); 565 $('body').height('1px'); 566 } else { 567 $('#right-popup-hamburger').trigger('click'); 568 569 $('.rightmenubar a[data-target="#practices-content"]').parent('li').addClass('active'); 570 } 571 572 }) 573 574 $('body').on('change','#toogle-menu', function(){ 575 if ( $('#toogle-menu').prop('checked') == false) { 576 $('body').height('auto'); 577 } 578 }); 579 $('body').on('change','#toogle-menu-right', function(){ 580 if ( $('#toogle-menu-right').prop('checked') == false) { 581 $('body').height('auto'); 582 } 583 }); 584 585 $('body').on('click', '.menu-item.attorney-menu a', function (e) { 586 e.preventDefault(); 587 if ($(window).width() > 991) { 588 $('body').height('1px'); 589 $('#toogle-menu').prop('checked', true); 590 $('#right-menu-2 a').trigger('click'); 591 } else { 592 $('#right-popup-hamburger').trigger('click'); 593 $('.rightmenubar a[data-target="#attorney-content"]').parent('li').addClass('active'); 594 } 595 596 597 }); 598 599 $('body').on('click', '.menu-item.industries-menu a', function (e) { 600 e.preventDefault(); 601 if ($(window).width() > 991) { 602 $('body').height('1px'); 603 $('#toogle-menu').prop('checked', true); 604 $('#right-menu-3 a').trigger('click'); 605 } else { 606 $('#right-popup-hamburger').trigger('click'); 607 $('.rightmenubar a[data-target="#industry-content"]').parent('li').addClass('active'); 608 609 } 610 611 612 }); 613 614 $('body').on('click', '#right-popup-hamburger', function (e) { 615 e.preventDefault(); 616 $('#toogle-menu-right').prop('checked', true); 617 $('body').height('1px'); 618 619 620 }); 621 622 $('body').on('click', '.locations-menu', function (e) { 623 e.preventDefault(); 624 $('#right-popup-hamburger').trigger('click'); 625 $('body').height('1px'); 626 627 628 }); 629 630 if ($(window).width() < 767) { 631 $('body').on('click', '.mob-practice-opener', function (e) { 632 e.preventDefault(); 633 $('#toogle-menu-right').prop('checked', true); 634 $('body').height('1px'); 635 var target = $(this).data('mobtarget'); 636 setTimeout(function () { 637 $('.rightmenubar a[data-target="#practices-content"]').parent('li').addClass('active'); 638 $('#' + target + ' button').trigger('click'); 639 }, 100); 640 641 }); 642 } 643 644 AddReadMore(); 645 646 647 $(window).on('load', function () { 648 $('.ct-select').select2(); 649 $('.header-attorny-select').select2(); 650 651 setTimeout(function () { 652 $("div.practice-area-home .item-wrapper") 653 .on("mouseenter", function () { 654 //console.log($(this).offset().left); 655 if (($(window).width() - $(this).offset().left) < 500) { 656 $(this).addClass('show-left'); 657 } 658 }) 659 .on("mouseleave", function () { 660 $(this).removeClass('show-left'); 661 }); 662 }, 1000); 663 664 665 666 667 668 }); 669 670 $('.season-filter').select2({ 671 minimumResultsForSearch: -1, 672 dropdownCssClass: 'season-dropdown', 673 dropdownAutoWidth: true 674 }); 675 $('.practice-list').select2({ 676 minimumResultsForSearch: -1, 677 dropdownCssClass: 'season-dropdown', 678 dropdownAutoWidth: true 679 }); 680 $('body').on('change', '#select-industry', function () { 681 if ($(this).val() != "") { 682 window.location.href = $(this).val(); 683 } 684 }); 685 $('body').on('click', '.header-serach-options-dropdown .dropdown-item', function (e) { 686 e.preventDefault(); 687 var text = $(this).text(); 688 var main = $(this).parent('li').parent('ul').closest('.header-serach-options-dropdown'); 689 690 $('.dropdown-toggle span', main).text(text); 691 }); 692 693 $('body').on('click', '.accordion-button', function (e) { 694 var deskt_mobile_filter = ".right-first-menu "; 695 if ($(window).width() < 768) { 696 deskt_mobile_filter = ".mobile-menu-wrapper "; 697 } 698 699 var current_target = $(this).attr('data-bs-target'); 700 var have_collapesd = $(this).hasClass('collapsed'); 701 //console.log(current_target); 702 $(deskt_mobile_filter + '.accordion-button').each(function () { 703 var loop_target = $(this).attr('data-bs-target'); 704 // console.log(loop_target); 705 706 if (current_target != loop_target) { 707 var n_loop_target = loop_target.replace("#", ".") 708 $(n_loop_target).removeClass('show'); 709 $(n_loop_target).addClass('collapse'); 710 $(this).addClass('collapsed'); 711 } 712 713 }); 714 }); 715 716 717 function convertTZ(date, tzString) { 718 return new Date((typeof date === "string" ? new Date(date) : date).toLocaleStr
718ing("en-US", { 719 timeZone: tzString 720 })); 721 } 722 723 $('.social-commitment-related-posts .elementor-post-date').each(function () { 724 725 var date_text = $(this).text().trim(); 726 var dateObject = new Date(date_text); 727 //console.log(dateObject.getMonth()); 728 var new_date = dateObject.getDate() + "/" + (dateObject.getMonth() + 1) + "/" + dateObject.getFullYear().toString().slice(-2); 729 $(this).text(new_date); 730 }); 731 732 window.next_div_offset = 0; 733 if (jQuery('#practice-sticky-sidebar').length > 0) { 734 var initial_offset_top = jQuery('#practice-sticky-sidebar').offset().top; 735 window.next_div_offset = jQuery('.content-sidebar-main').next().offset().top; 736 if (window.next_div_offset == 0) { 737 window.next_div_offset = jQuery('footer').offset().top + 20; 738 } 739 //console.log(next_div_offset, "next-offset"); 740 } 741 jQuery(window).on('load', function () { 742 if (jQuery('#practice-sticky-sidebar').length > 0) { 743 var initial_offset_top = jQuery('#practice-sticky-sidebar').offset().top; 744 } 745 }); 746 747 var max_width_for_sidebar = jQuery('#practice-sticky-sidebar').parent('div').width(); 748 if (jQuery('.sub-nav-menu').length > 0) { 749 var subnav = jQuery('.sub-nav-menu').offset().top; 750 } else { 751 var subnav = ""; 752 } 753 var lastScrollTop = 0; 754 var is_down = false; 755 var is_up = false; 756 jQuery(window).scroll(function ($) { 757 758 759 var $ = jQuery; 760 var scrolltop = st = $(window).scrollTop(); 761 //console.log(height); 762 if (scrolltop > 80) { 763 jQuery('#page').addClass('sticky'); 764 } else { 765 jQuery('#page').removeClass('sticky'); 766 } 767 if (st > lastScrollTop) { 768 is_down = true; 769 is_up = false; 770 } else { 771 is_down = false; 772 is_up = true; 773 } 774 775 var header_height = $('header').height(); 776 var adminbar = 0; 777 if ($('#wpadminbar').length > 0 && $('.attorneys-tab').length > 0) { 778 adminbar = $('#wpadminbar').height(); 779 } 780 /** practice sidebar scroll */ 781 if (jQuery('#practice-sticky-sidebar').length > 0) { 782 var sidebar_selector = jQuery('#practice-sticky-sidebar'); 783 var sidebar_height = sidebar_selector.height(); 784 var sidebar = sidebar_selector.offset().top; 785 //var main_wrapper_height = jQuery('.content-sidebar-main').height(); 786 var subnav_height = 0; 787 if ($('.sub-nav-menu').length > 0) { 788 subnav_height = $('.sub-nav-menu').height(); 789 //console.log(subnav_height); 790 } 791 //console.log(sidebar_height, $('.attorney-main').height() ); 792 793 // console.log("scroll", scrolltop); 794 // console.log("sidebar top", sidebar); 795 // console.log("sidebar height", sidebar_height); 796 // console.log("sidebar outer-height", sidebar_selector.parent('div').outerHeight()); 797 //console.log(initial_offset_top, sidebar_height, scrolltop, header_height, subnav_height, adminbar, window.next_div_offset); 798 //console.log((scrolltop + sidebar_height + header_height + subnav_height + adminbar ), window.next_div_offset); 799 if ($(window).width() > 767) { 800 801 if ((scrolltop + sidebar_height + header_height + subnav_height + adminbar) > window.next_div_offset) { 802 // console.log('in first'); 803 var sidebar_position = 'absolute'; 804 if ($('.attorney-main').length > 0) { 805 if ($('.attorney-main').height() < (sidebar_height + 100)) { 806 sidebar_selector.css({ 807 top: 'auto', 808 bottom: 0, 809 position: "relative", 810 'max-width': max_width_for_sidebar + 20 811 }); 812 // console.log('in first 11'); 813 } else { 814 // console.log('in first else 11'); 815 sidebar_selector.css({ 816 top: 'auto', 817 bottom: 0, 818 position: "absolute", 819 'max-width': max_width_for_sidebar + 20 820 }); 821 } 822 } else { 823 if ($('.aside-leftpart').height() > (sidebar_height + 100 )) { 824 // console.log('in first else', $('.aside-leftpart').height(), sidebar_height ); 825 sidebar_selector.css({ 826 top: 'auto', 827 bottom: 0, 828 position: "absolute", 829 'max-width': max_width_for_sidebar + 20 830 }); 831 } 832 833 } 834 835 836 } else if (parseInt(initial_offset_top) <= parseInt(scrolltop + header_height + subnav_height + adminbar + 20)) { 837 // console.log('in second'); 838 if ($('.attorney-main').length > 0) { 839 if ($('.attorney-main').height() < (sidebar_height + 100)) { 840 sidebar_selector.css({ 841 top: 'auto', 842 bottom: 0, 843 position: "relative", 844 'max-width': max_width_for_sidebar + 20 845 }); 846 // console.log('in second 11'); 847 } else { 848 sidebar_selector.css({ 849 top: (header_height + subnav_height + adminbar + 20), 850 position: 'fixed', 851 'max-width': max_width_for_sidebar + 20 852 }); 853 } 854 } else { 855 // console.log('in second else ', $('.aside-leftpart').height(), sidebar_height); 856 if ($('.aside-leftpart').height() > (sidebar_height + 100)) { 857 sidebar_selector.css({ 858 top: (header_height + subnav_height + adminbar + 20), 859 bottom: '', 860 position: 'fixed', 861 'max-width': max_width_for_sidebar 862 }); 863 } 864 } 865 866 867 //sidebar_selector.parent('div').css('min-height',sidebar_selector.height()); 868 869 870 871 872 } else if ((scrolltop < (initial_offset_top)) && sidebar_selector.css('position') == 'fixed') { 873 // console.log('in third'); 874 sidebar_selector.css({ 875 top: 0, 876 position: 'relative', 877 }); 878 879 } 880 } 881 lastScrollTop = st; 882 883 } 884 885 886 887 if ($('.sub-nav-menu').length > 0) { 888 if (scrolltop > (subnav - header_height)) { 889 $('.sub-nav-menu').addClass('fixed-subnav'); 890 $('.sub-nav-menu').css('top', header_height + adminbar); 891 $('.sub-nav-menu').parent('div').css('padding-top', jQuery('.sub-nav-menu').height()); 892 } else { 893 $('.sub-nav-menu').removeClass('fixed-subnav'); 894 $('.sub-nav-menu').css('top', 0); 895 $('.sub-nav-menu').parent('div').css('padding-top', 0); 896 } 897 898 } 899 900 if ($('.sub-nav-menu').length > 0) { 901 if ($(window).width() > 767) { 902 var height_reducer = 150; 903 var dblhistory = 200; 904 var biography_reducer = 180; 905 } else { 906 var height_reducer = 250; 907 var dblhistory = 100; 908 var biography_reducer = 250; 909 } 910 911 var check_iems = header_height + adminbar + $('.sub-nav-menu').height() + 150; 912 913 914 // console.log($('#diversity').offset().top, scrolltop, check_iems ) 915 if ( 916 $('#team').length > 0 && 917 ($('#team').offset().top - check_iems) < scrolltop && 918 ($('#team').offset().top + $('#team').height() - height_reducer) > scrolltop 919 ) { 920 //console.log('teamm----'); 921 $('.sub-nav-menu ul li a').removeClass('active'); 922 $('.sub-nav-menu ul li a[data-target="#team"]').addClass('active'); 923 } else 924 if ( 925 $('#overview').length > 0 && 926 ($('#overview').offset().top - check_iems) < scrolltop && 927 ($('#overview').offset().top + $('#overview').height() - 220) > scrolltop 928 ) { 929 // console.log($('#overview').offset().top + $('#overview').height(), scrolltop, $('#resources').offset().top ); 930 $('.sub-nav-menu ul li a').removeClass('active'); 931 $('.sub-nav-menu ul li a[data-target="#overview"]').addClass('active'); 932 } else 933 if ( 934 $('#resources').length > 0 && 935 ($('#resources').offset().top - check_iems) < scrolltop && 936 ($('#resources').offset().top + $('#resources').height() - 100) > scrolltop 937 ) { 938 //console.log('resources ----'); 939 $('.sub-nav-menu ul li a').removeClass('active'); 940 $('.sub-nav-menu ul li a[data-target="#resources"]').addClass('active'); 941 } else 942 if ( 943 $('#life_at_dbl').length > 0 && 944 ($('#life_at_dbl').offset().top - check_iems) < scrolltop && 945 ($('#life_at_dbl').offset().top + $('#life_at_dbl').height() - height_reducer) > scrolltop 946 ) { 947 //console.log('resources ----'); 948 $('.sub-nav-menu ul li').removeClass('active'); 949 $('.sub-nav-menu ul li a[data-target="#life_at_dbl"]').parent('li').addClass('active'); 950 } else 951 if ( 952 $('#diversity').length > 0 && 953 ($('#diversity').offset().top - check_iems) < scrolltop && 954 ($('#diversity').offset().top + $('#diversity').height() - height_reducer) > scrolltop 955 ) { 956 //console.log('resources ----'); 957 $('.sub-nav-menu ul li').removeClass('active'); 958 $('.sub-nav-menu ul li a[data-target="#diversity"]').parent('li').addClass('active'); 959 } else 960 if ( 961 $('#professional_development').length > 0 && 962 ($('#professional_development').offset().top - check_iems) < scrolltop && 963 ($('#professional_development').offset().top + $('#professional_development').height() - height_reducer) > scrolltop 964 ) { 965 //console.log('resources ----'); 966 $('.sub-nav-menu ul li').removeClass('active'); 967 $('.sub-nav-menu ul li a[data-target="#professional_development"]').parent('li').addClass('active'); 968 } else 969 if ( 970 $('#health_wellness').length > 0 && 971 ($('#health_wellness').offset().top - check_iems) < scrolltop && 972 ($('#health_wellness').offset().top + $('#health_wellness').height() - height_reducer) > scrolltop 973 ) { 974 //console.log('resources ----'); 975 $('.sub-nav-menu ul li').removeClass('active'); 976 $('.sub-nav-menu ul li a[data-target="#health_wellness"]').parent('li').addClass('active'); 977 } else 978 if ( 979 $('#almuni_group').length > 0 && 980 ($('#almuni_group').offset().top - check_iems) < scrolltop && 981 ($('#almuni_group').offset().top + $('#almuni_group').height() - height_reducer) > scrolltop 982 ) { 983 //console.log('resources ----'); 984 $('.sub-nav-menu ul li').removeClass('active'); 985 $('.sub-nav-menu ul li a[data-target="#almuni_group"]').parent('li').addClass('active'); 986 } else 987 if ( 988 $('#dblhistory').length > 0 && 989 ($('#dblhistory').offset().top - check_iems) < scrolltop && 990 ($('#dblhistory').offset().top + $('#dblhistory').height() - dblhistory) > scrolltop 991 ) { 992 //console.log('resources ----'); 993 $('.sub-nav-menu ul li').removeClass('active'); 994 $('.sub-nav-menu ul li a[data-target="#dblhistory"]').parent('li').addClass('active'); 995 } else 996 if ( 997 $('#dblinitiatives').length > 0 && 998 ($('#dblinitiatives').offset().top - check_iems) < scrolltop && 999 ($('#dblinitiatives').offset().top + $('#dblinitiatives').height() - height_reducer) > scrolltop 1000 ) { 1001 //console.log('resources ----'); 1002 $('.sub-nav-menu ul li').removeClass('active'); 1003 $('.sub-nav-menu ul li a[data-target="#dblinitiatives"]').parent('li').addClass('active'); 1004 } else 1005 if ( 1006 $('#mission_statement').length > 0 && 1007 ($('#mission_statement').offset().top - check_iems) < scrolltop && 1008 ($('#mission_statement').offset().top + $('#mission_statement').height() - height_reducer) > scrolltop 1009 ) { 1010 //console.log('resources ----'); 1011 $('.sub-nav-menu ul li').removeClass('active'); 1012 $('.sub-nav-menu ul li a[data-target="#mission_statement"]').parent('li').addClass('active'); 1013 } else 1014 if ( 1015 $('#giving_back').length > 0 && 1016 ($('#giving_back').offset().top - check_iems) < scrolltop && 1017 ($('#giving_back').offset().top + $('#giving_back').height() - height_reducer) > scrolltop 1018 ) { 1019 //console.log('resources ----'); 1020 $('.sub-nav-menu ul li').removeClass('active'); 1021 $('.sub-nav-menu ul li a[data-target="#giving_back"]').parent('li').addClass('active'); 1022 } else 1023 if ( 1024 $('#related_articles').length > 0 && 1025 ($('#related_articles').offset().top - check_iems) < scrolltop && 1026 ($('#related_articles').offset().top + $('#related_articles').height() - height_reducer) > scrolltop 1027 ) { 1028 //console.log('resources ----'); 1029 $('.sub-nav-menu ul li').removeClass('active'); 1030 $('.sub-nav-menu ul li a[data-target="#related_articles"]').parent('li').addClass('active'); 1031 } else 1032 if ( 1033 $('#community_involvement').length > 0 && 1034 ($('#community_involvement').offset().top - check_iems) < scrolltop && 1035 ($('#community_involvement').offset().top + $('#community_involvement').height() - height_reducer) > scrolltop 1036 ) { 1037 //console.log('resources ----'); 1038 $('.sub-nav-menu ul li').removeClass('active'); 1039 $('.sub-nav-menu ul li a[data-target="#community_involvement"]').parent('li').addClass('active'); 1040 } else 1041 if ( 1042 $('#biography').length > 0 && 1043 ($('#biography').offset().top - check_iems) < scrolltop && 1044 ($('#biography').offset().top + $('#biography').height() - biography_reducer) > scrolltop 1045 ) { 1046 //console.log('resources ----'); 1047 $('.sub-nav-menu ul li').removeClass('active'); 1048 $('.sub-nav-menu ul li a[data-target="#biography"]').parent('li').addClass('active'); 1049 } else 1050 if ( 1051 $('#experience').length > 0 && 1052 ($('#experience').offset().top - check_iems) < scrolltop && 1053 ($('#experience').offset().top + $('#experience').height() - height_reducer) > scrolltop 1054 ) { 1055 //console.log('resources ----'); 1056 $('.sub-nav-menu ul li').removeClass('active'); 1057 $('.sub-nav-menu ul li a[data-target="#experience"]').parent('li').addClass('active'); 1058 } else 1059 if ( 1060
1060 $('#awards-honors').length > 0 && 1061 ($('#awards-honors').offset().top - check_iems) < scrolltop && 1062 ($('#awards-honors').offset().top + $('#awards-honors').height() - height_reducer) > scrolltop 1063 ) { 1064 //console.log('resources ----'); 1065 $('.sub-nav-menu ul li').removeClass('active'); 1066 $('.sub-nav-menu ul li a[data-target="#awards-honors"]').parent('li').addClass('active'); 1067 } else 1068 if ( 1069 $('#education').length > 0 && 1070 ($('#education').offset().top - check_iems) < scrolltop && 1071 ($('#education').offset().top + $('#education').height() - height_reducer) > scrolltop 1072 ) { 1073 //console.log('resources ----'); 1074 $('.sub-nav-menu ul li').removeClass('active'); 1075 $('.sub-nav-menu ul li a[data-target="#education"]').parent('li').addClass('active'); 1076 } else 1077 if ( 1078 $('#admissions').length > 0 && 1079 ($('#admissions').offset().top - check_iems) < scrolltop && 1080 ($('#admissions').offset().top + $('#admissions').height() - height_reducer) > scrolltop 1081 ) { 1082 //console.log('resources ----'); 1083 $('.sub-nav-menu ul li').removeClass('active'); 1084 $('.sub-nav-menu ul li a[data-target="#admissions"]').parent('li').addClass('active'); 1085 } else 1086 if ( 1087 $('#memberships-ssociations').length > 0 && 1088 ($('#memberships-ssociations').offset().top - check_iems) < scrolltop && 1089 ($('#memberships-ssociations').offset().top + $('#memberships-ssociations').height() - height_reducer) > scrolltop 1090 ) { 1091 //console.log('resources ----'); 1092 $('.sub-nav-menu ul li').removeClass('active'); 1093 $('.sub-nav-menu ul li a[data-target="#memberships-ssociations"]').parent('li').addClass('active'); 1094 } 1095 else 1096 if ( 1097 $('#teaching').length > 0 && 1098 ($('#teaching').offset().top - check_iems) < scrolltop && 1099 ($('#teaching').offset().top + $('#teaching').height() - height_reducer) > scrolltop 1100 ) { 1101 //console.log('resources ----'); 1102 $('.sub-nav-menu ul li').removeClass('active'); 1103 $('.sub-nav-menu ul li a[data-target="#teaching"]').parent('li').addClass('active'); 1104 } 1105 else 1106 if ( 1107 $('#military').length > 0 && 1108 ($('#military').offset().top - check_iems) < scrolltop && 1109 ($('#military').offset().top + $('#military').height() - height_reducer) > scrolltop 1110 ) { 1111 //console.log('resources ----'); 1112 $('.sub-nav-menu ul li').removeClass('active'); 1113 $('.sub-nav-menu ul li a[data-target="#military"]').parent('li').addClass('active'); 1114 } 1115 else 1116 if ( 1117 $('#passions').length > 0 && 1118 ($('#passions').offset().top - check_iems) < scrolltop && 1119 ($('#passions').offset().top + $('#passions').height() - height_reducer) > scrolltop 1120 ) { 1121 //console.log('resources ----'); 1122 $('.sub-nav-menu ul li').removeClass('active'); 1123 $('.sub-nav-menu ul li a[data-target="#passions"]').parent('li').addClass('active'); 1124 } else 1125 if ( 1126 $('#thought-leadership').length > 0 && 1127 ($('#thought-leadership').offset().top - check_iems) < scrolltop && 1128 ($('#thought-leadership').offset().top + $('#thought-leadership').height() - height_reducer) > scrolltop 1129 ) { 1130 //console.log('resources ----'); 1131 $('.sub-nav-menu ul li').removeClass('active'); 1132 $('.sub-nav-menu ul li a[data-target="#thought-leadership"]').parent('li').addClass('active'); 1133 } 1134 1135 } 1136 1137 1138 1139 1140 1141 1142 }); 1143 1144 1145 /* Scroll to */ 1146 1147 $("body").on('click', '.scrollto', function () { 1148 $('html, body').animate({ 1149 scrollTop: 0 1150 }, 'slow'); 1151 }); 1152 1153 1154 1155 $('body').on('click', '.load-more', function (evt) { 1156 evt.preventDefault(); 1157 var elem = $(this); 1158 var qp = elem.data('qp');
1159 var append_to = elem.data('append'); 1160 1161 var current_text = elem.text(); 1162 elem.text('Loading...'); 1163 elem.prop('disabled', true); 1164 1165 $.ajax({ 1166 url: meuajax.ajaxurl, 1167 type: 'GET', 1168 data: qp + "&action=load_search_results", 1169 success: function (data) { 1170 elem.prop('disabled', false); 1171 var res = $.parseJSON(data); 1172 elem.text(current_text); 1173 $('.output-' + append_to).append(res.html); 1174 elem.data('qp', res.qp); 1175 if (res.show_load_more == false) { 1176 elem.hide(); 1177 1178 } 1179 1180 1181 } 1182 }); 1183 }); 1184 1185 $('body').on('click', '.load-more-blogs', function (evt) { 1186 evt.preventDefault(); 1187 var elem = $(this); 1188 var qp = elem.data('qp'); 1189 var append_to = elem.data('append'); 1190 1191 var current_text = elem.text(); 1192 elem.text('Loading...'); 1193 elem.prop('disabled', true); 1194 1195 $.ajax({ 1196 url: meuajax.ajaxurl, 1197 type: 'GET', 1198 data: qp + "&action=load_blog_results", 1199 success: function (data) { 1200 elem.prop('disabled', false); 1201 var res = $.parseJSON(data); 1202 elem.text(current_text); 1203 $('#' + append_to).append(res.html); 1204 elem.data('qp', res.qp); 1205 if (res.show_load_more == false) { 1206 elem.hide(); 1207 1208 } 1209 1210 1211 } 1212 }); 1213 }); 1214 $('body').on('click', '.search-results-filter a', function (e) { 1215 e.preventDefault(); 1216 $('.all-results').hide(); 1217 $('.' + $(this).data('ref')).show(); 1218 $('.search-results-filter a').removeClass('active'); 1219 $(this).addClass('active'); 1220 if ($(this).data('ref') == 'all-results') { 1221 $(".all-results[data-records='no-record']").hide(); 1222 } 1223 1224 }); 1225 // $('body').on('click', '.attorneys-tab a', function (e) { 1226 // e.preventDefault(); 1227 // $('.attorneys-tab li').removeClass('active'); 1228 // $(this).parent('li').addClass('active'); 1229 // }); 1230 $('body').on('click', '.sub-nav-menu a', function (e) { 1231 e.preventDefault(); 1232 $('.sub-nav-menu li').removeClass('active'); 1233 $(this).parent('li').addClass('active'); 1234 }); 1235 1236 1237 1238 1239 $('body').on('change', '.season-filter', function () { 1240 //console.log($(this).val()); 1241 $('.seasonval').val($(this).val()); 1242 //$('#season-filter-form').submit(); 1243 $(this).closest('form').submit(); 1244 }); 1245 $('body').on('change', '.practice-list', function () { 1246 //console.log($(this).closest('form')); 1247 $(this).closest('form').submit(); 1248 }); 1249 // $('body').on('change', '.blog-search-filter', function (e) { 1250 // var filter_by = $(this).attr('name'); 1251 // var filter = $(this).val(); 1252 // $('#filter_by').val(filter_by); 1253 // $('#filter_value').val(filter); 1254 // $('#blogs-search-form').submit(); 1255 // }); 1256 //console.log("========== loaded =========="); 1257 $('body').on('change', '.blog-search-filter', function (e) { 1258 // console.log("========== change =========="); 1259 1260 var filter_by = $(this).attr('name'); 1261 var filter = $(this).val(); 1262 if (filter_by == 'practices') { 1263 $('#filter_value_practice').val(filter); 1264 } 1265 if (filter_by == 'industries') { 1266 $('#filter_value_industry').val(filter); 1267 } 1268 //console.log("========== after condition =========="); 1269 1270 $('#filter_by').val(filter_by); 1271 $('#filter_value').val(filter); 1272 $('#blogs-search-form').submit(); 1273 }); 1274 1275 1276 1277 function menu_attorney_filter() { 1278 var deskt_mobile_filter = ".right-second-menu "; 1279 if ($(window).width() < 768) { 1280 deskt_mobile_filter = ".mobile-menu-wrapper "; 1281 } 1282 var page = parseInt($(deskt_mobile_filter + "#attorneys_pages").val()); // get default page no 1283 var ppp = $(deskt_mobile_filter + "#attorneys_per_page").val(); // get Post per page 1284 var menu_practice_id = $(deskt_mobile_filter + "#menu_practice_id").val(); 1285 var menu_industry_id = $(deskt_mobile_filter + "#menu_industry_id").val(); 1286 var menu_office_id = $(deskt_mobile_filter + "#menu_office_id").val(); 1287 var attorney_name_search = $(deskt_mobile_filter + "#attorney_name_search").val(); 1288 $(deskt_mobile_filter + "#loading").show(); // Show loading snipper 1289 1290 $.ajax({ 1291 url: meuajax.ajaxurl, 1292 type: 'POST', 1293 data: { 1294 action: 'load_next_previous_attorneys', 1295 paged: 1, 1296 ppp: ppp, 1297 practice_id: menu_practice_id, 1298 industry_id: menu_industry_id, 1299 office_id: menu_office_id, 1300 keys: attorney_name_search 1301 }, 1302 success: function (data) { 1303 if (data == "") { 1304 data = "<p class='no-record'> No Record Found </p>"; 1305 } 1306 $(deskt_mobile_filter + "#attorneys_pages").val(1); //increase page no 1307 $(deskt_mobile_filter + ".attorneys-list").html(''); // empty existing data 1308 $(deskt_mobile_filter + ".attorneys-list").html(data); //add new data 1309 $(deskt_mobile_filter + "#loading").hide(); 1310 setTimeout(function () { 1311 1312 if ($(deskt_mobile_filter + ".attorneys-list .col-lg-3").length != ppp) { 1313 $(deskt_mobile_filter + ".previous-page").hide(); 1314 $(deskt_mobile_filter + ".next-page").hide(); 1315 } else { 1316 $(deskt_mobile_filter + ".next-page").show(); 1317 } 1318 }, 100); 1319 1320 1321 } 1322 }); 1323 1324 } 1325 1326 $('body').on('click', '.attorneys-tab a', function (e) { 1327 e.preventDefault(); 1328 var target = $(this).data('target'); 1329 //console.log(traget); 1330 $('.attorneys-tab li').removeClass('active'); 1331 1332 $('ul.attorneys-tab li a').addClass('notclicked'); 1333 jQuery(this).removeClass('notclicked'); 1334 //jQuery(this).addClass('active'); 1335 jQuery(this).addClass('clicked'); 1336 1337 $(this).parent('li').addClass('active'); 1338 1339 var topitems = 0; 1340 if ($('#wpadminbar').length > 0 && $('.attorneys-tab').length > 0) { 1341 topitems = topitems + $('#wpadminbar').height(); 1342 } 1343 topitems = topitems + $('header').height(); 1344 topitems = topitems + $('.attorneys-tab').height(); 1345 1346 $('html, body').animate({ 1347 scrollTop: $(target).offset().top - topitems 1348 }, 'slow'); 1349 1350 1351 1352 setTimeout(function () { 1353 $('ul.attorneys-tab li a').removeClass('clicked'); 1354 $('ul.attorneys-tab li a').removeClass('notclicked'); 1355 }, 1000); 1356 1357 1358 }); 1359 1360 $('body').on('click', '.industry-tab a', function (e) { 1361 e.preventDefault(); 1362 var target = $(this).data('target'); 1363 1364 var topitems = 0; 1365 if ($('#wpadminbar').length > 0) { 1366 topitems = topitems + $('#wpadminbar').height(); 1367 } 1368 topitems = topitems + $('header').height(); 1369 topitems = topitems + $('.industry-tab').height(); 1370 1371 $('html, body').animate({ 1372 scrollTop: $(target).offset().top - topitems 1373 }, 'slow'); 1374 1375 1376 }); 1377 1378 $('body').on('click', '.custom-tab-dbl a', function (e) { 1379 e.preventDefault(); 1380 var target = $(this).data('target'); 1381 1382 1383 $('.custom-tab-dbl li').addClass('notclicked'); 1384 jQuery(this).parent('li').removeClass('notclicked'); 1385 1386 jQuery(this).parent('li').addClass('clicked'); 1387 1388 1389 1390 1391 var topitems = 0; 1392 if ($('#wpadminbar').length > 0) { 1393 topitems = topitems + $('#wpadminbar').height(); 1394 } 1395 topitems = topitems + $('header').height(); 1396 topitems = topitems + $('.custom-tab-dbl').height(); 1397 1398 $('html, body').animate({ 1399 scrollTop: $(target).offset().top - topitems 1400 }, 'slow'); 1401 setTimeout(function () { 1402 $('.custom-tab-dbl li').removeClass('clicked'); 1403 $('.custom-tab-dbl li').removeClass('notclicked'); 1404 }, 1500); 1405 1406 1407 }); 1408 1409 jQuery.noConflict(); 1410 1411 $('body').on('click', 'a.video-link', function (e) { 1412 e.preventDefault(); 1413 var url = $(this).attr('href'); 1414 $.magnificPopup.open({ 1415 items: { 1416 src: url 1417 }, 1418 type: 'iframe' 1419 }); 1420 //$(this).magnificPopup({type:'iframe'}); 1421 }); 1422 1423 1424 1425 $('body').on('click', '.find-a-lawyer-btn', function(e) { 1426 e.preventDefault(); 1427 var office_id = $(this).data('location_id'); 1428 var element = $(".office-dropdown-menu a[data-val='" + office_id + "']"); 1429 element.trigger('click'); 1430 $('.attorney-menu a').trigger('click'); 1431 }); 1432 1433 1434 1435}); 1436 1437function AddReadMore() { 1438 //This limit you can set after how much characters you want to show Read More. 1439 var carLmt = 650; 1440 // Text to show when text is collapsed 1441 var readMoreTxt = "Read More"; 1442 // Text to show when text is expanded 1443 var readLessTxt = "Read Less"; 1444 1445 1446 //Traverse all selectors with this class and manupulate HTML part to show Read More 1447 jQuery(".addReadMore").each(function () { 1448 if (jQuery(this).find(".firstSec").length) 1449 return; 1450 1451 var allstr = jQuery(this).html(); 1452 if (jQuery('.split-here', jQuery(this)).length > 0) { 1453 var reg = /<span class="split-here"><\/span>/g;
1454 var textRuns = allstr.split(reg); 1455 carLmt = textRuns[0].length 1456 1457 } 1458 1459 var added_readmore = 0; 1460 if (allstr.length > carLmt) { 1461 var firstSet = allstr.substring(0, carLmt); 1462 var secdHalf = allstr.substring(carLmt, allstr.length); 1463 var strtoadd = firstSet + "<span class='SecSec'>" + secdHalf + "</span><a class='readMore read-more' href='javascript:void(0);' title='Click to Show More'>" + readMoreTxt + "</a><a class='readLess read-more' href='javascript:void(0);' title='Click to Show Less'>" + readLessTxt + "</a>"; 1464 $(this).html(strtoadd); 1465 added_readmore = 1 1466 } 1467 var found_breaker = 0; 1468 var i = 0; 1469 jQuery("p", jQuery(this)).each(function () { 1470 1471 //console.log(jQuery('.SecSec',jQuery(this)).length); 1472 1473 1474 if (found_breaker == 1 && i != 0 && added_readmore != 0) { 1475 // console.log(i, found_breaker, added_readmore); 1476 jQuery(this).addClass('SecSec'); 1477 } 1478 if (jQuery('.SecSec', jQuery(this)).length > 0) { 1479 1480 found_breaker = 1; 1481 } 1482 i++; 1483 1484 }); 1485 // console.log('before ul ', found_breaker, added_readmore); 1486 // var i = 0; 1487 jQuery("ul li", jQuery(this)).each(function () { 1488 1489 //console.log(jQuery('.SecSec',jQuery(this)).length); 1490 1491 1492 if (found_breaker == 1 && i != 0 && added_readmore != 0) { 1493 // console.log(i, found_breaker, added_readmore); 1494 jQuery(this).addClass('SecSec'); 1495 } 1496 if (jQuery('.SecSec', jQuery(this)).length > 0) { 1497 1498 found_breaker = 1; 1499 } 1500 i++; 1501 1502 }); 1503 1504}); 1505 1506 //Read More and Read Less Click Event binding 1507} 1508 1509 window.addEventListener("load", function() { 1510 if (window.location.hash) { 1511 var element = document.getElementById(window.location.hash.substring(1)); 1512 if (element) { 1513 element.scrollIntoView({ behavior: 'smooth' }); 1514 } 1515 } 1516 1517 1518 1519 }); 1520 jQuery(document).ready(function ($) { 1521 var wv = $(window).width(); 1522 if (wv < 767) { 1523 $("body").on("mouseenter touchstart", ".gf_step", function(){ 1524 $('.gf_step_label').hide(); 1525 $('.gf_step_label',$(this)).show(); 1526 }); 1527 1528 } 1529 $('body').on('click','.select-package, .select-package-wrapper',function(e){ 1530 e.preventDefault(); 1531 $('.select-package').removeClass('active'); 1532 $('.select-package-wrapper').removeClass('active'); 1533 $(this).addClass('active'); 1534 var target_package = $(this).data('package'); 1535 if (target_package == '#choice_24_50_0') { 1536 $('#gf_step_after_submit').addClass('hide'); 1537 $('#gf_step_24_5').addClass('no-line'); 1538 } else { 1539 $('#gf_step_after_submit').removeClass('hide'); 1540 $('#gf_step_24_5').removeClass('no-line'); 1541 } 1542 $(target_package).trigger('click'); 1543 }); 1544 1545 $('body').on('click','.show-practice-area-btn a',function(e){ 1546 e.preventDefault(); 1547 $('body').toggleClass('visible-practice'); 1548 if ($('body').hasClass('visible-practice')){ 1549 $('body').removeClass('hide-visible-section'); 1550 } else { 1551 $('body').addClass('hide-visible-section'); 1552 } 1553 1554 1555 }); 1556 1557 $('body').on('click','.footer-contact-btn a',function(e){ 1558 e.preventDefault(); 1559 $('body').toggleClass('popup-form-opened'); 1560 1561 }); 1562 1563 1564// if ( $('#input_24_43_1').length > 0){ 1565// $('body').on('change', $('#input_24_43_1')) 1566// } 1567}); 1568/*document.addEventListener('click', function(e) { 1569 var node = e.target; 1570 var inside = false;
1571 while (node) { 1572 if (node.classList.contains('gf_step')) { 1573 inside = true; 1574 break; 1575 } 1576 node = node.parentElement; 1577 } 1578 1579 if (!inside) { 1580 var wv = $(window).width(); 1581 if (wv < 767) { 1582 $('.gf_step_label').hide(); 1583 } 1584 // click was outside 1585 } 1586});*/ 1587(function($) { 1588 document.addEventListener('click', function(e) { 1589 var node = e.target; 1590 var inside = false; 1591 while (node) { 1592 if (node.classList && node.classList.contains('gf_step')) { 1593 inside = true; 1594 break; 1595 } 1596 node = node.parentElement; 1597 } 1598 1599 if (!inside) { 1600 var wv = $(window).width(); 1601 if (wv < 767) { 1602 $('.gf_step_label').hide(); 1603 } 1604 // click was outside 1605 } 1606 }); 1607})(jQuery); 1608
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.